21 instantiations of CharacterRange
System.Drawing.Common.Tests (19)
mono\System.Drawing\GraphicsTests.cs (4)
1892CharacterRange[] ranges = [new CharacterRange(0, 5), new CharacterRange(5, 9)]; 1915CharacterRange[] ranges = [new CharacterRange(first, length)]; 1959CharacterRange[] ranges = [new CharacterRange(5, 4)];
mono\System.Imaging\MetafileTest.cs (2)
306CharacterRange[] ranges = [new CharacterRange(0, 5), new CharacterRange(5, 9)];
System\Drawing\CharacterRangeTests.cs (11)
22CharacterRange range = new(First, Length); 33CharacterRange range = new() 50CharacterRange range = new() 63yield return new object[] { new CharacterRange(1, 2), new CharacterRange(1, 2), true }; 64yield return new object[] { new CharacterRange(1, 2), new CharacterRange(2, 2), false }; 65yield return new object[] { new CharacterRange(1, 2), new CharacterRange(1, 1), false }; 66yield return new object[] { new CharacterRange(1, 2), new(), false }; 71yield return new object[] { new CharacterRange(1, 2), null, false };
System\Drawing\StringFormatTests.cs (2)
201yield return new object[] { new CharacterRange[] { new(1, 2) } }; 202yield return new object[] { new CharacterRange[] { new(-1, -1) } };
System.Windows.Forms (2)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
638ranges.Add(new CharacterRange(charStart, ConvertToCharIndex(link.Start + length, text) - charStart)); 642ranges.Add(new CharacterRange(0, text.Length));
26 references to CharacterRange
System.Drawing (1)
System.Drawing.cs (1)
12[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.CharacterRange))]
System.Drawing.Common (5)
Special\NotSupported.cs (5)
248public static bool operator ==(System.Drawing.CharacterRange cr1, System.Drawing.CharacterRange cr2) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 249public static bool operator !=(System.Drawing.CharacterRange cr1, System.Drawing.CharacterRange cr2) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1149public void SetMeasurableCharacterRanges(System.Drawing.CharacterRange[] ranges) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (17)
mono\System.Drawing\GraphicsTests.cs (4)
1892CharacterRange[] ranges = [new CharacterRange(0, 5), new CharacterRange(5, 9)]; 1915CharacterRange[] ranges = [new CharacterRange(first, length)]; 1959CharacterRange[] ranges = [new CharacterRange(5, 4)]; 2004private static readonly CharacterRange[] s_ranges = [new(0, 1), new(1, 1), new(2, 1)];
mono\System.Imaging\MetafileTest.cs (1)
306CharacterRange[] ranges = [new CharacterRange(0, 5), new CharacterRange(5, 9)];
System\Drawing\CharacterRangeTests.cs (6)
11CharacterRange range = default; 22CharacterRange range = new(First, Length); 33CharacterRange range = new() 50CharacterRange range = new() 77public void Equals_Invoke_ReturnsExpected(CharacterRange range, object obj, bool expected) 80if (obj is CharacterRange otherRange)
System\Drawing\StringFormatTests.cs (6)
200yield return new object[] { Array.Empty<CharacterRange>() }; 201yield return new object[] { new CharacterRange[] { new(1, 2) } }; 202yield return new object[] { new CharacterRange[] { new(-1, -1) } }; 203yield return new object[] { new CharacterRange[32] }; 208public void SetMeasurableCharacterRanges_Valid_Success(CharacterRange[] ranges) 225Assert.Throws<OverflowException>(() => format.SetMeasurableCharacterRanges(new CharacterRange[33]));
System.Windows.Forms (3)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (3)
609CharacterRange[] regions = AdjustCharacterRangesForSurrogateChars(); 618private CharacterRange[] AdjustCharacterRangesForSurrogateChars() 629List<CharacterRange> ranges = new(Links.Count + 1);