27 instantiations of LinkArea
System.Windows.Forms (5)
System\Windows\Forms\Controls\Labels\LinkArea.LinkAreaConverter.cs (2)
73
return new
LinkArea
(values[0], values[1]);
125
return new
LinkArea
(
System\Windows\Forms\Controls\Labels\LinkLabel.cs (3)
166
? new
LinkArea
(0, 0)
167
: new
LinkArea
(_links[0].Start, _links[0].Length);
1526
private void ResetLinkArea() => LinkArea = new
LinkArea
(0, -1);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (1)
120
Value = new
LinkArea
(_sampleEdit.SelectionStart, _sampleEdit.SelectionLength);
System.Windows.Forms.Tests (21)
SerializableTypesTests.cs (1)
106
LinkArea linkArea =
new
(5, 7);
System\Windows\Forms\LinkAreaConverterTests.cs (7)
26
yield return new object[] { "1,2", new
LinkArea
(1, 2) };
27
yield return new object[] { " 1 , 1", new
LinkArea
(1, 1) };
76
Assert.Equal("1, 2", converter.ConvertTo(new
LinkArea
(1, 2), typeof(string)));
77
Assert.Equal("1, 2", converter.ConvertTo(null, null, new
LinkArea
(1, 2), typeof(string)));
78
Assert.Equal("1, 2", converter.ConvertTo(null, CultureInfo.InvariantCulture, new
LinkArea
(1, 2), typeof(string)));
85
InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new
LinkArea
(1, 2), typeof(InstanceDescriptor)));
123
Assert.Equal(new
LinkArea
(1, 2), area);
System\Windows\Forms\LinkAreaTests.cs (13)
28
LinkArea area =
new
(start, length);
38
LinkArea area =
new
()
53
LinkArea area =
new
()
66
yield return new object[] { new
LinkArea
(1, 2), new
LinkArea
(1, 2), true };
67
yield return new object[] { new
LinkArea
(1, 2), new
LinkArea
(2, 2), false };
68
yield return new object[] { new
LinkArea
(1, 2), new
LinkArea
(1, 3), false };
70
yield return new object[] { new
LinkArea
(1, 2), new(), false };
71
yield return new object[] { new
LinkArea
(1, 2), null, false };
91
LinkArea area =
new
(1, 2);
98
LinkArea area =
new
(1, 2);
64 references to LinkArea
System.Windows.Forms (13)
System\Windows\Forms\Controls\Labels\LinkArea.cs (7)
10
public partial struct LinkArea : IEquatable<
LinkArea
>
41
if (o is not
LinkArea
a)
49
public readonly bool Equals(
LinkArea
other)
54
public static bool operator ==(
LinkArea
linkArea1,
LinkArea
linkArea2)
57
public static bool operator !=(
LinkArea
linkArea1,
LinkArea
linkArea2)
System\Windows\Forms\Controls\Labels\LinkArea.LinkAreaConverter.cs (3)
88
if (value is
LinkArea
pt)
106
typeof(
LinkArea
).GetConstructor([typeof(int), typeof(int)]),
153
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(
LinkArea
), attributes);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (3)
163
public
LinkArea
LinkArea
170
LinkArea
pt = LinkArea;
1697
LinkArea
pt = LinkArea;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (1)
138
if (Value is not
LinkArea
linkArea)
System.Windows.Forms.Tests (50)
SerializableAttributeTests.cs (1)
20
{ typeof(
LinkArea
).FullName },
SerializableTypesTests.cs (3)
106
LinkArea
linkArea = new(5, 7);
116
LinkArea
result = BinarySerialization.EnsureDeserialize<
LinkArea
>(blob);
System\Windows\Forms\LinkAreaConverterTests.cs (37)
16
[InlineData(typeof(
LinkArea
), false)]
20
var converter = new
LinkArea
.LinkAreaConverter();
36
var converter = new
LinkArea
.LinkAreaConverter();
47
var converter = new
LinkArea
.LinkAreaConverter();
56
var converter = new
LinkArea
.LinkAreaConverter();
63
[InlineData(typeof(
LinkArea
), false)]
68
var converter = new
LinkArea
.LinkAreaConverter();
75
var converter = new
LinkArea
.LinkAreaConverter();
84
var converter = new
LinkArea
.LinkAreaConverter();
86
Assert.Equal(typeof(
LinkArea
).GetConstructor([typeof(int), typeof(int)]), descriptor.MemberInfo);
93
var converter = new
LinkArea
.LinkAreaConverter();
100
var converter = new
LinkArea
.LinkAreaConverter();
105
[InlineData(typeof(
LinkArea
))]
109
var converter = new
LinkArea
.LinkAreaConverter();
110
Assert.Throws<NotSupportedException>(() => converter.ConvertTo(default(
LinkArea
), destinationType));
116
var converter = new
LinkArea
.LinkAreaConverter();
117
LinkArea
area = Assert.IsType<
LinkArea
>(converter.CreateInstance(
120
{ nameof(
LinkArea
.Start), 1 },
121
{ nameof(
LinkArea
.Length), 2 }
129
var converter = new
LinkArea
.LinkAreaConverter();
139
{ nameof(
LinkArea
.Start), new object() },
140
{ nameof(
LinkArea
.Length), 2 },
147
{ nameof(
LinkArea
.Start), null },
148
{ nameof(
LinkArea
.Length), 2 },
155
{ nameof(
LinkArea
.Length), 2 }
163
{ nameof(
LinkArea
.Start), 1 },
164
{ nameof(
LinkArea
.Length), new object() }
171
{ nameof(
LinkArea
.Start), 1 },
172
{ nameof(
LinkArea
.Length), null }
179
{ nameof(
LinkArea
.Start), 1 }
188
var converter = new
LinkArea
.LinkAreaConverter();
195
var converter = new
LinkArea
.LinkAreaConverter();
202
var converter = new
LinkArea
.LinkAreaConverter();
205
Assert.Equal(nameof(
LinkArea
.Start), properties[0].Name);
206
Assert.Equal(nameof(
LinkArea
.Length), properties[1].Name);
212
var converter = new
LinkArea
.LinkAreaConverter();
System\Windows\Forms\LinkAreaTests.cs (9)
14
LinkArea
area = default;
28
LinkArea
area = new(start, length);
38
LinkArea
area = new()
53
LinkArea
area = new()
76
public void LinkArea_Equals_Invoke_ReturnsExpected(
LinkArea
area, object other, bool expected)
78
if (other is
LinkArea
otherArea)
91
LinkArea
area = new(1, 2);
98
LinkArea
area = new(1, 2);
99
Assert.IsType<
LinkArea
.LinkAreaConverter>(TypeDescriptor.GetConverter(area));