4 instantiations of Index
Microsoft.CodeAnalysis.Threading.Package (4)
src\Dependencies\Contracts\Index.cs (4)
56public static Index Start => new Index(0); 59public static Index End => new Index(~0); 71return new Index(value); 84return new Index(~value);
23 references to Index
Microsoft.CodeAnalysis.Threading.Package (23)
src\Dependencies\Contracts\Index.cs (9)
25internal readonly struct Index : IEquatable<Index> 56public static Index Start => new Index(0); 59public static Index End => new Index(~0); 64public static Index FromStart(int value) 77public static Index FromEnd(int value) 127public override bool Equals(object? value) => value is Index && _value == ((Index)value)._value; 131public bool Equals(Index other) => _value == other._value; 137public static implicit operator Index(int value) => FromStart(value);
src\Dependencies\Contracts\Range.cs (14)
28public Index Start { get; } 31public Index End { get; } 36public Range(Index start, Index end) 62static string getFromEndSpecifier(Index index) => index.IsFromEnd ? "^" : string.Empty; 63static string toString(Index index) => ((uint)index.Value).ToString(); 67public static Range StartAt(Index start) => new Range(start, Index.End); 70public static Range EndAt(Index end) => new Range(Index.Start, end); 73public static Range All => new Range(Index.Start, Index.End); 88Index startIndex = Start; 95Index endIndex = End;