4 instantiations of Index
Microsoft.CodeAnalysis.Threading.Package (4)
src\Dependencies\Contracts\Index.cs (4)
58public static Index Start => new Index(0); 61public static Index End => new Index(~0); 73return new Index(value); 86return new Index(~value);
23 references to Index
Microsoft.CodeAnalysis.Threading.Package (23)
src\Dependencies\Contracts\Index.cs (9)
27internal readonly struct Index : IEquatable<Index> 58public static Index Start => new Index(0); 61public static Index End => new Index(~0); 66public static Index FromStart(int value) 79public static Index FromEnd(int value) 129public override bool Equals(object? value) => value is Index && _value == ((Index)value)._value; 133public bool Equals(Index other) => _value == other._value; 139public static implicit operator Index(int value) => FromStart(value);
src\Dependencies\Contracts\Range.cs (14)
30public Index Start { get; } 33public Index End { get; } 38public Range(Index start, Index end) 64static string getFromEndSpecifier(Index index) => index.IsFromEnd ? "^" : string.Empty; 65static string toString(Index index) => ((uint)index.Value).ToString(); 69public static Range StartAt(Index start) => new Range(start, Index.End); 72public static Range EndAt(Index end) => new Range(Index.Start, end); 75public static Range All => new Range(Index.Start, Index.End); 90Index startIndex = Start; 97Index endIndex = End;