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