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