14 instantiations of SyntaxNodeOrTokenList
Microsoft.CodeAnalysis (10)
Syntax\SeparatedSyntaxList.cs (2)
26
return new SeparatedSyntaxList<TNode>(new
SyntaxNodeOrTokenList
(nodes[0], index: 0));
84
: this(new
SyntaxNodeOrTokenList
(node, index))
Syntax\SyntaxListBuilderExtensions.cs (1)
50
return new SeparatedSyntaxList<TNode>(new
SyntaxNodeOrTokenList
(listNode.CreateRed(), 0));
Syntax\SyntaxNodeOrTokenList.cs (2)
74
return new
SyntaxNodeOrTokenList
(CreateNodeFromSpan(nodesAndTokens), index: 0);
362
return new
SyntaxNodeOrTokenList
(newGreen.CreateRed(), 0);
Syntax\SyntaxNodeOrTokenListBuilder.cs (5)
139
return new
SyntaxNodeOrTokenList
(
145
return new
SyntaxNodeOrTokenList
(_nodes[0]!.CreateRed(), index: 0);
148
return new
SyntaxNodeOrTokenList
(
152
return new
SyntaxNodeOrTokenList
(
162
return new
SyntaxNodeOrTokenList
(InternalSyntax.SyntaxList.List(tmp).CreateRed(), index: 0);
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Query.cs (1)
911
return MakeQueryInvocation(node, receiver, methodName, new SeparatedSyntaxList<TypeSyntax>(new
SyntaxNodeOrTokenList
(typeArgSyntax, 0)), ImmutableArray.Create(typeArg), ImmutableArray<BoundExpression>.Empty, diagnostics
Syntax\SyntaxFactory.cs (3)
1374
return new SeparatedSyntaxList<TNode>(new
SyntaxNodeOrTokenList
(node, index: 0));
1550
return new
SyntaxNodeOrTokenList
(nodesAndTokens);
1559
return new
SyntaxNodeOrTokenList
(nodesAndTokens);
92 references to SyntaxNodeOrTokenList
Microsoft.CodeAnalysis (49)
Syntax\CommonSyntaxNodeRemover.cs (1)
12
SyntaxNodeOrTokenList
nodesAndSeparators, int nodeIndex, int endOfLineKind,
Syntax\SeparatedSyntaxList.cs (7)
47
private readonly
SyntaxNodeOrTokenList
_list;
51
internal SeparatedSyntaxList(
SyntaxNodeOrTokenList
list)
67
private static void Validate(
SyntaxNodeOrTokenList
list)
330
public
SyntaxNodeOrTokenList
GetWithSeparators()
410
var
nodesWithSeps = this.GetWithSeparators();
486
var
nodesWithSeps = this.GetWithSeparators();
572
var
nodesWithSeps = this.GetWithSeparators();
Syntax\SeparatedSyntaxListBuilder.cs (2)
88
SyntaxNodeOrTokenList
list = nodes.GetWithSeparators();
97
SyntaxNodeOrTokenList
list = nodes.GetWithSeparators();
Syntax\SyntaxListBuilder.cs (2)
113
public void AddRange(
SyntaxNodeOrTokenList
list)
118
public void AddRange(
SyntaxNodeOrTokenList
list, int offset, int count)
Syntax\SyntaxNodeOrTokenList.cs (33)
22
[CollectionBuilder(typeof(
SyntaxNodeOrTokenList
), "Create")]
23
public readonly struct SyntaxNodeOrTokenList : IEquatable<
SyntaxNodeOrTokenList
>, IReadOnlyCollection<SyntaxNodeOrToken>
36
/// Initializes a new instance of the <see cref="
SyntaxNodeOrTokenList
"/> structure.
52
/// Create a <see cref="
SyntaxNodeOrTokenList
"/> from a sequence of <see cref="SyntaxNodeOrToken"/>.
61
/// Create a <see cref="
SyntaxNodeOrTokenList
"/> from one or more <see cref="SyntaxNodeOrToken"/>.
69
public static
SyntaxNodeOrTokenList
Create(ReadOnlySpan<SyntaxNodeOrToken> nodesAndTokens)
287
/// Creates a new <see cref="
SyntaxNodeOrTokenList
"/> with the specified node or token added to the end.
290
public
SyntaxNodeOrTokenList
Add(SyntaxNodeOrToken nodeOrToken)
296
/// Creates a new <see cref="
SyntaxNodeOrTokenList
"/> with the specified nodes or tokens added to the end.
299
public
SyntaxNodeOrTokenList
AddRange(IEnumerable<SyntaxNodeOrToken> nodesOrTokens)
305
/// Creates a new <see cref="
SyntaxNodeOrTokenList
"/> with the specified node or token inserted at the index.
309
public
SyntaxNodeOrTokenList
Insert(int index, SyntaxNodeOrToken nodeOrToken)
320
/// Creates a new <see cref="
SyntaxNodeOrTokenList
"/> with the specified nodes or tokens inserted at the index.
324
public
SyntaxNodeOrTokenList
InsertRange(int index, IEnumerable<SyntaxNodeOrToken> nodesAndTokens)
346
private static
SyntaxNodeOrTokenList
CreateList(List<SyntaxNodeOrToken> items)
350
return default(
SyntaxNodeOrTokenList
);
366
/// Creates a new <see cref="
SyntaxNodeOrTokenList
"/> with the element at the specified index removed.
369
public
SyntaxNodeOrTokenList
RemoveAt(int index)
382
/// Creates a new <see cref="
SyntaxNodeOrTokenList
"/> with the specified element removed.
385
public
SyntaxNodeOrTokenList
Remove(SyntaxNodeOrToken nodeOrTokenInList)
397
/// Creates a new <see cref="
SyntaxNodeOrTokenList
"/> with the specified element replaced with a new node or token.
401
public
SyntaxNodeOrTokenList
Replace(SyntaxNodeOrToken nodeOrTokenInList, SyntaxNodeOrToken newNodeOrToken)
412
/// Creates a new <see cref="
SyntaxNodeOrTokenList
"/> with the specified element replaced with a new nodes and tokens.
416
public
SyntaxNodeOrTokenList
ReplaceRange(SyntaxNodeOrToken nodeOrTokenInList, IEnumerable<SyntaxNodeOrToken> newNodesAndTokens)
480
public static bool operator ==(
SyntaxNodeOrTokenList
left,
SyntaxNodeOrTokenList
right)
493
public static bool operator !=(
SyntaxNodeOrTokenList
left,
SyntaxNodeOrTokenList
right)
506
public bool Equals(
SyntaxNodeOrTokenList
other)
520
return obj is
SyntaxNodeOrTokenList
&& Equals((
SyntaxNodeOrTokenList
)obj);
540
private readonly
SyntaxNodeOrTokenList
_list;
543
internal Enumerator(in
SyntaxNodeOrTokenList
list)
Syntax\SyntaxNodeOrTokenListBuilder.cs (4)
87
public void Add(
SyntaxNodeOrTokenList
list)
92
public void Add(
SyntaxNodeOrTokenList
list, int offset, int length)
130
public
SyntaxNodeOrTokenList
ToList()
167
return default(
SyntaxNodeOrTokenList
);
Microsoft.CodeAnalysis.CSharp (13)
CSharpExtensions.cs (1)
352
internal static SeparatedSyntaxList<TOther> AsSeparatedList<TOther>(this
SyntaxNodeOrTokenList
list) where TOther : SyntaxNode
Syntax\SyntaxFactory.cs (11)
1488
/// Creates a separated list from a <see cref="
SyntaxNodeOrTokenList
"/>, where the list elements start with a node and then alternate between
1493
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(
SyntaxNodeOrTokenList
nodesAndTokens) where TNode : SyntaxNode
1508
private static bool NodesAreCorrectType<TNode>(
SyntaxNodeOrTokenList
list)
1522
private static bool HasSeparatedNodeTokenPattern(
SyntaxNodeOrTokenList
list)
1537
/// Creates an empty <see cref="
SyntaxNodeOrTokenList
"/>.
1539
public static
SyntaxNodeOrTokenList
NodeOrTokenList()
1541
return default(
SyntaxNodeOrTokenList
);
1545
/// Create a <see cref="
SyntaxNodeOrTokenList
"/> from a sequence of <see cref="SyntaxNodeOrToken"/>.
1548
public static
SyntaxNodeOrTokenList
NodeOrTokenList(IEnumerable<SyntaxNodeOrToken> nodesAndTokens)
1554
/// Create a <see cref="
SyntaxNodeOrTokenList
"/> from one or more <see cref="SyntaxNodeOrToken"/>.
1557
public static
SyntaxNodeOrTokenList
NodeOrTokenList(params SyntaxNodeOrToken[] nodesAndTokens)
Syntax\SyntaxNodeRemover.cs (1)
209
var
withSeps = list.GetWithSeparators();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
336
var
elementsWithSeparators = elements.GetWithSeparators();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
162
var
originalArgumentListChildren = argumentList.Arguments.GetWithSeparators();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
76
var
nodeOrTokenList = nodes.GetWithSeparators();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
161
var
argumentsWithSeparators = argumentList.Arguments.GetWithSeparators();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfCodeFixProvider.cs (1)
65
var
list = NodeOrTokenList(current.Arguments.GetWithSeparators().Select(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
352
var
argsAndCommas = tupleExpression.Arguments.GetWithSeparators();
Microsoft.CodeAnalysis.CSharp.Features (14)
ConvertAnonymousType\CSharpConvertAnonymousTypeToClassCodeRefactoringProvider.cs (4)
50
private static
SyntaxNodeOrTokenList
OmitTrailingComma(
SyntaxNodeOrTokenList
list)
68
private
SyntaxNodeOrTokenList
CreateArguments(
SyntaxNodeOrTokenList
list)
SignatureHelp\SignatureHelpUtilities.cs (4)
29
private static readonly Func<BaseArgumentListSyntax,
SyntaxNodeOrTokenList
> s_getBaseArgumentListArgumentsWithSeparators =
31
private static readonly Func<TypeArgumentListSyntax,
SyntaxNodeOrTokenList
> s_getTypeArgumentListArgumentsWithSeparators =
33
private static readonly Func<InitializerExpressionSyntax,
SyntaxNodeOrTokenList
> s_getInitializerExpressionArgumentsWithSeparators =
35
private static readonly Func<AttributeArgumentListSyntax,
SyntaxNodeOrTokenList
> s_getAttributeArgumentListArgumentsWithSeparators =
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (1)
29
private static readonly Func<TupleExpressionSyntax,
SyntaxNodeOrTokenList
> s_getArgumentsWithSeparators = e => e.Arguments.GetWithSeparators();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
336
var
elementsWithSeparators = elements.GetWithSeparators();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
162
var
originalArgumentListChildren = argumentList.Arguments.GetWithSeparators();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
76
var
nodeOrTokenList = nodes.GetWithSeparators();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
161
var
argumentsWithSeparators = argumentList.Arguments.GetWithSeparators();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfCodeFixProvider.cs (1)
65
var
list = NodeOrTokenList(current.Arguments.GetWithSeparators().Select(
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
47
internal override SeparatedSyntaxList<TElement> SeparatedList<TElement>(
SyntaxNodeOrTokenList
list)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
352
var
argsAndCommas = tupleExpression.Arguments.GetWithSeparators();
Microsoft.CodeAnalysis.Features (6)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (2)
720
private
SyntaxNodeOrTokenList
ConvertArguments(SyntaxGenerator generator, NamingRule parameterNamingRule, bool isRecord,
SyntaxNodeOrTokenList
list)
SignatureHelp\CommonSignatureHelpUtilities.cs (2)
28
Func<TArgumentList,
SyntaxNodeOrTokenList
> getArgumentsWithSeparators,
52
Func<TArgumentList,
SyntaxNodeOrTokenList
> getArgumentsWithSeparators,
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (2)
307
var
itemsAndSeparators = _listItems.GetWithSeparators();
438
var
itemsAndSeparators = _listItems.GetWithSeparators();
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxGenerator.cs (1)
1493
internal abstract SeparatedSyntaxList<TElement> SeparatedList<TElement>(
SyntaxNodeOrTokenList
list) where TElement : SyntaxNode;
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
352
var
argsAndCommas = tupleExpression.Arguments.GetWithSeparators();