4 instantiations of Index
Microsoft.CodeAnalysis.CodeStyle (4)
Index.cs (4)
48
public static Index Start => new
Index
(0);
51
public static Index End => new
Index
(~0);
63
return new
Index
(value);
76
return new
Index
(~value);
25 references to Index
Microsoft.CodeAnalysis.CodeStyle (24)
EmbeddedSyntaxNode.cs (1)
54
public EmbeddedSyntaxNodeOrToken<TSyntaxKind, TSyntaxNode> this[
Index
index] => this[index.GetOffset(this.ChildCount)];
Index.cs (9)
17
internal readonly struct Index : IEquatable<
Index
>
48
public static
Index
Start => new Index(0);
51
public static
Index
End => new Index(~0);
56
public static
Index
FromStart(int value)
69
public static
Index
FromEnd(int value)
119
public override bool Equals(object? value) => value is
Index
&& _value == ((
Index
)value)._value;
123
public bool Equals(
Index
other) => _value == other._value;
129
public static implicit operator
Index
(int value) => FromStart(value);
Range.cs (14)
22
public
Index
Start { get; }
25
public
Index
End { get; }
30
public Range(
Index
start,
Index
end)
58
static string getFromEndSpecifier(
Index
index) => index.IsFromEnd ? "^" : string.Empty;
59
static string toString(
Index
index) => ((uint)index.Value).ToString();
63
public static Range StartAt(
Index
start) => new Range(start,
Index
.End);
66
public static Range EndAt(
Index
end) => new Range(
Index
.Start, end);
69
public static Range All => new Range(
Index
.Start,
Index
.End);
82
Index
startIndex = Start;
89
Index
endIndex = End;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
45
var indexType = compilation.GetBestTypeByMetadataName(typeof(
Index
).FullName!);