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