Skip to content

Commit 7c4e705

Browse files
committed
Renamed UnitValue to Value
1 parent be964c0 commit 7c4e705

File tree

7 files changed

+137
-137
lines changed

7 files changed

+137
-137
lines changed

src/Synercoding.Primitives/Extensions/SizeExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static Size Expand(this Size size, Spacing spacing)
3333
/// <param name="size">The size to base the <see cref="Rectangle"/> on</param>
3434
/// <returns>A new <see cref="Rectangle"/></returns>
3535
public static Rectangle AsRectangle(this Size size)
36-
=> new Rectangle(new UnitValue(0, size.Width.Unit), new UnitValue(0, size.Height.Unit), size.Width, size.Height);
36+
=> new Rectangle(new Value(0, size.Width.Unit), new Value(0, size.Height.Unit), size.Width, size.Height);
3737

3838
/// <summary>
3939
/// Get a <see cref="Size"/> where the Width and Height are switched

src/Synercoding.Primitives/Point.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ namespace Synercoding.Primitives
1616
/// <param name="unit">The unit type of the coordinates</param>
1717
public Point(double x, double y, Unit unit)
1818
{
19-
X = new UnitValue(x, unit);
20-
Y = new UnitValue(y, unit);
19+
X = new Value(x, unit);
20+
Y = new Value(y, unit);
2121
}
2222

2323
/// <summary>
2424
/// Constructor for a <see cref="Point"/>
2525
/// </summary>
2626
/// <param name="x">The X coordinate</param>
2727
/// <param name="y">The Y coordinate</param>
28-
public Point(UnitValue x, UnitValue y)
28+
public Point(Value x, Value y)
2929
{
3030
X = x;
3131
Y = y;
@@ -36,7 +36,7 @@ public Point(UnitValue x, UnitValue y)
3636
/// </summary>
3737
/// <param name="x">Out parameter for the <see cref="X"/> property</param>
3838
/// <param name="y">Out parameter for the <see cref="Y"/> property</param>
39-
public void Deconstruct(out UnitValue x, out UnitValue y)
39+
public void Deconstruct(out Value x, out Value y)
4040
{
4141
x = X;
4242
y = Y;
@@ -51,12 +51,12 @@ public static Point Origin
5151
/// <summary>
5252
/// The X coordinate
5353
/// </summary>
54-
public UnitValue X { get; }
54+
public Value X { get; }
5555

5656
/// <summary>
5757
/// The Y coordinate
5858
/// </summary>
59-
public UnitValue Y { get; }
59+
public Value Y { get; }
6060

6161
/// <inheritdoc />
6262
public Point ConvertTo(Unit unit)

src/Synercoding.Primitives/Rectangle.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ namespace Synercoding.Primitives
1818
/// <param name="unit">The unit type of the coordinates</param>
1919
public Rectangle(double llx, double lly, double urx, double ury, Unit unit)
2020
{
21-
LLX = new UnitValue(llx, unit);
22-
LLY = new UnitValue(lly, unit);
23-
URX = new UnitValue(urx, unit);
24-
URY = new UnitValue(ury, unit);
21+
LLX = new Value(llx, unit);
22+
LLY = new Value(lly, unit);
23+
URX = new Value(urx, unit);
24+
URY = new Value(ury, unit);
2525
}
2626

2727
/// <summary>
@@ -31,7 +31,7 @@ public Rectangle(double llx, double lly, double urx, double ury, Unit unit)
3131
/// <param name="lly">The lower left y coordinate</param>
3232
/// <param name="urx">The upper right x coordinate</param>
3333
/// <param name="ury">The upper right y coordinate</param>
34-
public Rectangle(UnitValue llx, UnitValue lly, UnitValue urx, UnitValue ury)
34+
public Rectangle(Value llx, Value lly, Value urx, Value ury)
3535
{
3636
LLX = llx;
3737
LLY = lly;
@@ -70,7 +70,7 @@ public void Deconstruct(out Point location, out Size size)
7070
/// <param name="lly">The out parameter for the lower left y coordinate</param>
7171
/// <param name="urx">The out parameter for the upper right x coordinate</param>
7272
/// <param name="ury">The out parameter for the upper right y coordinate</param>
73-
public void Deconstruct(out UnitValue llx, out UnitValue lly, out UnitValue urx, out UnitValue ury)
73+
public void Deconstruct(out Value llx, out Value lly, out Value urx, out Value ury)
7474
{
7575
llx = LLX;
7676
lly = LLY;
@@ -87,33 +87,33 @@ public static Rectangle Zero
8787
/// <summary>
8888
/// The lower left x coordinate
8989
/// </summary>
90-
public UnitValue LLX { get; }
90+
public Value LLX { get; }
9191

9292
/// <summary>
9393
/// The lower left y coordinate
9494
/// </summary>
95-
public UnitValue LLY { get; }
95+
public Value LLY { get; }
9696

9797
/// <summary>
9898
/// The upper right x coordinate
9999
/// </summary>
100-
public UnitValue URX { get; }
100+
public Value URX { get; }
101101

102102
/// <summary>
103103
/// The upper right y coordinate
104104
/// </summary>
105-
public UnitValue URY { get; }
105+
public Value URY { get; }
106106

107107
/// <summary>
108108
/// The width of this <see cref="Rectangle"/>
109109
/// </summary>
110-
public UnitValue Width
110+
public Value Width
111111
=> URX - LLX;
112112

113113
/// <summary>
114114
/// The height of this <see cref="Rectangle"/>
115115
/// </summary>
116-
public UnitValue Height
116+
public Value Height
117117
=> URY - LLY;
118118

119119
/// <summary>

src/Synercoding.Primitives/Size.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ namespace Synercoding.Primitives
1616
/// <param name="unit">The unit of the <see cref="Size"/></param>
1717
public Size(double width, double height, Unit unit)
1818
{
19-
Width = new UnitValue(width, unit);
20-
Height = new UnitValue(height, unit);
19+
Width = new Value(width, unit);
20+
Height = new Value(height, unit);
2121
}
2222

2323
/// <summary>
2424
/// Constructor for a <see cref="Size"/>
2525
/// </summary>
2626
/// <param name="width">The width parameter</param>
2727
/// <param name="height">The height parameter</param>
28-
public Size(UnitValue width, UnitValue height)
28+
public Size(Value width, Value height)
2929
{
3030
Width = width;
3131
Height = height;
@@ -36,7 +36,7 @@ public Size(UnitValue width, UnitValue height)
3636
/// </summary>
3737
/// <param name="width">Out parameter for the <see cref="Width"/> property</param>
3838
/// <param name="height">Out parameter for the <see cref="Height"/> property</param>
39-
public void Deconstruct(out UnitValue width, out UnitValue height)
39+
public void Deconstruct(out Value width, out Value height)
4040
{
4141
width = Width;
4242
height = Height;
@@ -51,12 +51,12 @@ public static Size Empty
5151
/// <summary>
5252
/// The width property
5353
/// </summary>
54-
public UnitValue Width { get; }
54+
public Value Width { get; }
5555

5656
/// <summary>
5757
/// The height property
5858
/// </summary>
59-
public UnitValue Height { get; }
59+
public Value Height { get; }
6060

6161
/// <summary>
6262
/// Get the <see cref="Primitives.Orientation"/> of the size

src/Synercoding.Primitives/Spacing.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public Spacing(double all, Unit unit)
2727
/// <param name="unit">The unit of the <paramref name="unit"/> parameter.</param>
2828
public Spacing(double left, double top, double right, double bottom, Unit unit)
2929
{
30-
Left = new UnitValue(left, unit);
31-
Top = new UnitValue(top, unit);
32-
Right = new UnitValue(right, unit);
33-
Bottom = new UnitValue(bottom, unit);
30+
Left = new Value(left, unit);
31+
Top = new Value(top, unit);
32+
Right = new Value(right, unit);
33+
Bottom = new Value(bottom, unit);
3434
}
3535

3636
/// <summary>
@@ -40,7 +40,7 @@ public Spacing(double left, double top, double right, double bottom, Unit unit)
4040
/// <param name="top">The amount of top spacing</param>
4141
/// <param name="right">The amount of right spacing</param>
4242
/// <param name="bottom">The amount of bottom spacing</param>
43-
public Spacing(UnitValue left, UnitValue top, UnitValue right, UnitValue bottom)
43+
public Spacing(Value left, Value top, Value right, Value bottom)
4444
{
4545
Left = left;
4646
Top = top;
@@ -55,7 +55,7 @@ public Spacing(UnitValue left, UnitValue top, UnitValue right, UnitValue bottom)
5555
/// <param name="top">Out parameter for the <see cref="Top"/> property</param>
5656
/// <param name="right">Out parameter for the <see cref="Right"/> property</param>
5757
/// <param name="bottom">Out parameter for the <see cref="Bottom"/> property</param>
58-
public void Deconstruct(out UnitValue left, out UnitValue top, out UnitValue right, out UnitValue bottom)
58+
public void Deconstruct(out Value left, out Value top, out Value right, out Value bottom)
5959
{
6060
left = Left;
6161
top = Top;
@@ -72,22 +72,22 @@ public static Spacing Nothing
7272
/// <summary>
7373
/// The amount of spacing on the left side
7474
/// </summary>
75-
public UnitValue Left { get; }
75+
public Value Left { get; }
7676

7777
/// <summary>
7878
/// The amount of spacing on the top side
7979
/// </summary>
80-
public UnitValue Top { get; }
80+
public Value Top { get; }
8181

8282
/// <summary>
8383
/// The amount of spacing on the right side
8484
/// </summary>
85-
public UnitValue Right { get; }
85+
public Value Right { get; }
8686

8787
/// <summary>
8888
/// The amount of spacing on the bottom side
8989
/// </summary>
90-
public UnitValue Bottom { get; }
90+
public Value Bottom { get; }
9191

9292
/// <inheritdoc/>
9393
public Spacing ConvertTo(Unit unit)

0 commit comments

Comments
 (0)