16 instantiations of SyntaxNodeOrTokenList
Microsoft.CodeAnalysis (10)
Syntax\SeparatedSyntaxList.cs (2)
25return new SeparatedSyntaxList<TNode>(new SyntaxNodeOrTokenList(nodes[0], index: 0)); 83: this(new SyntaxNodeOrTokenList(node, index))
Syntax\SyntaxListBuilderExtensions.cs (1)
50return new SeparatedSyntaxList<TNode>(new SyntaxNodeOrTokenList(listNode.CreateRed(), 0));
Syntax\SyntaxNodeOrTokenList.cs (2)
73return new SyntaxNodeOrTokenList(CreateNodeFromSpan(nodesAndTokens), index: 0); 361return new SyntaxNodeOrTokenList(newGreen.CreateRed(), 0);
Syntax\SyntaxNodeOrTokenListBuilder.cs (5)
139return new SyntaxNodeOrTokenList( 145return new SyntaxNodeOrTokenList(_nodes[0]!.CreateRed(), index: 0); 148return new SyntaxNodeOrTokenList( 152return new SyntaxNodeOrTokenList( 162return new SyntaxNodeOrTokenList(InternalSyntax.SyntaxList.List(tmp).CreateRed(), index: 0);
Microsoft.CodeAnalysis.CSharp (2)
Syntax\SyntaxFactory.cs (2)
1521return new SyntaxNodeOrTokenList(nodesAndTokens); 1530return new SyntaxNodeOrTokenList(nodesAndTokens);
Microsoft.CodeAnalysis.CSharp.Features (1)
ConvertAnonymousType\CSharpConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
69=> new(list.Select(CreateArgumentOrComma));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxNodeTests.cs (1)
3368var list = new SyntaxNodeOrTokenList();
Microsoft.CodeAnalysis.Features (1)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
721=> new(list.Select(v => ConvertArgumentOrToken(generator, parameterNamingRule, isRecord, v)));
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\SyntaxNodeFactories.vb (1)
1027Return New SyntaxNodeOrTokenList(nodesAndTokens)
116 references to SyntaxNodeOrTokenList
Microsoft.CodeAnalysis (49)
Syntax\CommonSyntaxNodeRemover.cs (1)
12SyntaxNodeOrTokenList nodesAndSeparators, int nodeIndex, int endOfLineKind,
Syntax\SeparatedSyntaxList.cs (7)
46private readonly SyntaxNodeOrTokenList _list; 50internal SeparatedSyntaxList(SyntaxNodeOrTokenList list) 66private static void Validate(SyntaxNodeOrTokenList list) 329public SyntaxNodeOrTokenList GetWithSeparators() 409var nodesWithSeps = this.GetWithSeparators(); 485var nodesWithSeps = this.GetWithSeparators(); 571var nodesWithSeps = this.GetWithSeparators();
Syntax\SeparatedSyntaxListBuilder.cs (2)
88SyntaxNodeOrTokenList list = nodes.GetWithSeparators(); 97SyntaxNodeOrTokenList list = nodes.GetWithSeparators();
Syntax\SyntaxListBuilder.cs (2)
113public void AddRange(SyntaxNodeOrTokenList list) 118public void AddRange(SyntaxNodeOrTokenList list, int offset, int count)
Syntax\SyntaxNodeOrTokenList.cs (33)
21[CollectionBuilder(typeof(SyntaxNodeOrTokenList), "Create")] 22public readonly struct SyntaxNodeOrTokenList : IEquatable<SyntaxNodeOrTokenList>, IReadOnlyCollection<SyntaxNodeOrToken> 35/// Initializes a new instance of the <see cref="SyntaxNodeOrTokenList"/> structure. 51/// Create a <see cref="SyntaxNodeOrTokenList"/> from a sequence of <see cref="SyntaxNodeOrToken"/>. 60/// Create a <see cref="SyntaxNodeOrTokenList"/> from one or more <see cref="SyntaxNodeOrToken"/>. 68public static SyntaxNodeOrTokenList Create(ReadOnlySpan<SyntaxNodeOrToken> nodesAndTokens) 286/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified node or token added to the end. 289public SyntaxNodeOrTokenList Add(SyntaxNodeOrToken nodeOrToken) 295/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified nodes or tokens added to the end. 298public SyntaxNodeOrTokenList AddRange(IEnumerable<SyntaxNodeOrToken> nodesOrTokens) 304/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified node or token inserted at the index. 308public SyntaxNodeOrTokenList Insert(int index, SyntaxNodeOrToken nodeOrToken) 319/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified nodes or tokens inserted at the index. 323public SyntaxNodeOrTokenList InsertRange(int index, IEnumerable<SyntaxNodeOrToken> nodesAndTokens) 345private static SyntaxNodeOrTokenList CreateList(List<SyntaxNodeOrToken> items) 349return default(SyntaxNodeOrTokenList); 365/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the element at the specified index removed. 368public SyntaxNodeOrTokenList RemoveAt(int index) 381/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified element removed. 384public SyntaxNodeOrTokenList Remove(SyntaxNodeOrToken nodeOrTokenInList) 396/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified element replaced with a new node or token. 400public SyntaxNodeOrTokenList Replace(SyntaxNodeOrToken nodeOrTokenInList, SyntaxNodeOrToken newNodeOrToken) 411/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified element replaced with a new nodes and tokens. 415public SyntaxNodeOrTokenList ReplaceRange(SyntaxNodeOrToken nodeOrTokenInList, IEnumerable<SyntaxNodeOrToken> newNodesAndTokens) 479public static bool operator ==(SyntaxNodeOrTokenList left, SyntaxNodeOrTokenList right) 492public static bool operator !=(SyntaxNodeOrTokenList left, SyntaxNodeOrTokenList right) 505public bool Equals(SyntaxNodeOrTokenList other) 519return obj is SyntaxNodeOrTokenList && Equals((SyntaxNodeOrTokenList)obj); 539private readonly SyntaxNodeOrTokenList _list; 542internal Enumerator(in SyntaxNodeOrTokenList list)
Syntax\SyntaxNodeOrTokenListBuilder.cs (4)
87public void Add(SyntaxNodeOrTokenList list) 92public void Add(SyntaxNodeOrTokenList list, int offset, int length) 130public SyntaxNodeOrTokenList ToList() 167return default(SyntaxNodeOrTokenList);
Microsoft.CodeAnalysis.CSharp (13)
CSharpExtensions.cs (1)
352internal static SeparatedSyntaxList<TOther> AsSeparatedList<TOther>(this SyntaxNodeOrTokenList list) where TOther : SyntaxNode
Syntax\SyntaxFactory.cs (11)
1459/// Creates a separated list from a <see cref="SyntaxNodeOrTokenList"/>, where the list elements start with a node and then alternate between 1464public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(SyntaxNodeOrTokenList nodesAndTokens) where TNode : SyntaxNode 1479private static bool NodesAreCorrectType<TNode>(SyntaxNodeOrTokenList list) 1493private static bool HasSeparatedNodeTokenPattern(SyntaxNodeOrTokenList list) 1508/// Creates an empty <see cref="SyntaxNodeOrTokenList"/>. 1510public static SyntaxNodeOrTokenList NodeOrTokenList() 1512return default(SyntaxNodeOrTokenList); 1516/// Create a <see cref="SyntaxNodeOrTokenList"/> from a sequence of <see cref="SyntaxNodeOrToken"/>. 1519public static SyntaxNodeOrTokenList NodeOrTokenList(IEnumerable<SyntaxNodeOrToken> nodesAndTokens) 1525/// Create a <see cref="SyntaxNodeOrTokenList"/> from one or more <see cref="SyntaxNodeOrToken"/>. 1528public static SyntaxNodeOrTokenList NodeOrTokenList(params SyntaxNodeOrToken[] nodesAndTokens)
Syntax\SyntaxNodeRemover.cs (1)
209var withSeps = list.GetWithSeparators();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
331var elementsWithSeparators = elements.GetWithSeparators();
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
164var originalArgumentListChildren = argumentList.Arguments.GetWithSeparators();
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
77var nodeOrTokenList = nodes.GetWithSeparators();
src\Analyzers\CSharp\CodeFixes\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfCodeFixProvider.cs (1)
60var list = NodeOrTokenList(typeArgumentList.Arguments.GetWithSeparators().Select(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
348var argsAndCommas = tupleExpression.Arguments.GetWithSeparators();
Microsoft.CodeAnalysis.CSharp.Features (13)
ConvertAnonymousType\CSharpConvertAnonymousTypeToClassCodeRefactoringProvider.cs (4)
50private static SyntaxNodeOrTokenList OmitTrailingComma(SyntaxNodeOrTokenList list) 68private SyntaxNodeOrTokenList CreateArguments(SyntaxNodeOrTokenList list)
SignatureHelp\SignatureHelpUtilities.cs (4)
28private static readonly Func<BaseArgumentListSyntax, SyntaxNodeOrTokenList> s_getBaseArgumentListArgumentsWithSeparators = 30private static readonly Func<TypeArgumentListSyntax, SyntaxNodeOrTokenList> s_getTypeArgumentListArgumentsWithSeparators = 32private static readonly Func<InitializerExpressionSyntax, SyntaxNodeOrTokenList> s_getInitializerExpressionArgumentsWithSeparators = 34private static readonly Func<AttributeArgumentListSyntax, SyntaxNodeOrTokenList> s_getAttributeArgumentListArgumentsWithSeparators =
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (1)
28private static readonly Func<TupleExpressionSyntax, SyntaxNodeOrTokenList> s_getArgumentsWithSeparators = e => e.Arguments.GetWithSeparators();
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
331var elementsWithSeparators = elements.GetWithSeparators();
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
164var originalArgumentListChildren = argumentList.Arguments.GetWithSeparators();
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
77var nodeOrTokenList = nodes.GetWithSeparators();
src\Analyzers\CSharp\CodeFixes\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfCodeFixProvider.cs (1)
60var list = NodeOrTokenList(typeArgumentList.Arguments.GetWithSeparators().Select(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Syntax\SyntaxNodeOrTokenListTests.cs (6)
33Assert.Throws<NotSupportedException>(() => default(SyntaxNodeOrTokenList.Enumerator).GetHashCode()); 34Assert.Throws<NotSupportedException>(() => default(SyntaxNodeOrTokenList.Enumerator).Equals(default(SyntaxNodeOrTokenList.Enumerator))); 178DoTestAddInsertRemoveReplaceOnEmptyList(default(SyntaxNodeOrTokenList)); 181private void DoTestAddInsertRemoveReplaceOnEmptyList(SyntaxNodeOrTokenList list) 188var newList = list.Add(tokenD);
Syntax\SyntaxNodeTests.cs (2)
694var nodesAndTokens = SyntaxFactory.NodeOrTokenList( 3368var list = new SyntaxNodeOrTokenList();
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
51internal override SeparatedSyntaxList<TElement> SeparatedList<TElement>(SyntaxNodeOrTokenList list)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
348var argsAndCommas = tupleExpression.Arguments.GetWithSeparators();
Microsoft.CodeAnalysis.Features (6)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (2)
720private SyntaxNodeOrTokenList ConvertArguments(SyntaxGenerator generator, NamingRule parameterNamingRule, bool isRecord, SyntaxNodeOrTokenList list)
SignatureHelp\CommonSignatureHelpUtilities.cs (2)
28Func<TArgumentList, SyntaxNodeOrTokenList> getArgumentsWithSeparators, 52Func<TArgumentList, SyntaxNodeOrTokenList> getArgumentsWithSeparators,
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (2)
308var itemsAndSeparators = _listItems.GetWithSeparators(); 439var itemsAndSeparators = _listItems.GetWithSeparators();
Microsoft.CodeAnalysis.VisualBasic (12)
Syntax\SyntaxNodeFactories.vb (11)
969''' Creates a separated list from a <see cref="SyntaxNodeOrTokenList"/>. 970''' The <see cref="SyntaxNodeOrTokenList"/> must start with a node and alternate between nodes and separator tokens. 974Public Shared Function SeparatedList(Of TNode As SyntaxNode)(nodesAndTokens As SyntaxNodeOrTokenList) As SeparatedSyntaxList(Of TNode) 986Private Shared Function NodesAreCorrectType(Of TNode)(list As SyntaxNodeOrTokenList) As Boolean 997Private Shared Function HasSeparatedNodeTokenPattern(list As SyntaxNodeOrTokenList) As Boolean 1008''' Creates an empty <see cref="SyntaxNodeOrTokenList"/>. 1010Public Shared Function NodeOrTokenList() As SyntaxNodeOrTokenList 1015''' Creates a <see cref="SyntaxNodeOrTokenList"/> from a sequence of nodes and tokens. 1018Public Shared Function NodeOrTokenList(nodesAndTokens As IEnumerable(Of SyntaxNodeOrToken)) As SyntaxNodeOrTokenList 1023''' Creates a <see cref="SyntaxNodeOrTokenList"/> from one or more nodes and tokens. 1026Public Shared Function NodeOrTokenList(ParamArray nodesAndTokens As SyntaxNodeOrToken()) As SyntaxNodeOrTokenList
VisualBasicExtensions.vb (1)
453Friend Function AsSeparatedList(Of TOther As SyntaxNode)(list As SyntaxNodeOrTokenList) As SeparatedSyntaxList(Of TOther)
Microsoft.CodeAnalysis.VisualBasic.Features (5)
ConvertAnonymousType\VisualBasicConvertAnonymousTypeToClassCodeRefactoringProvider.vb (2)
46Private Function CreateArguments(list As SyntaxNodeOrTokenList) As SyntaxNodeOrTokenList
SignatureHelp\SignatureHelpUtilities.vb (3)
35Private ReadOnly s_getArgumentListArgumentsWithSeparators As Func(Of ArgumentListSyntax, SyntaxNodeOrTokenList) = Function(list) list.Arguments.GetWithSeparators() 36Private ReadOnly s_getTypeArgumentListArgumentsWithSeparators As Func(Of TypeArgumentListSyntax, SyntaxNodeOrTokenList) = Function(list) list.Arguments.GetWithSeparators() 37Private ReadOnly s_getCollectionInitializerArgumentsWithSeparators As Func(Of CollectionInitializerSyntax, SyntaxNodeOrTokenList) = Function(i) i.Initializers.GetWithSeparators()
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
TestSyntaxNodes.vb (1)
263Private Sub VerifyListSpans(list As SyntaxNodeOrTokenList, expectedFullSpan As TextSpan)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
36Friend Overrides Function SeparatedList(Of TElement As SyntaxNode)(list As SyntaxNodeOrTokenList) As SeparatedSyntaxList(Of TElement)
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxGenerator.cs (1)
1436internal abstract SeparatedSyntaxList<TElement> SeparatedList<TElement>(SyntaxNodeOrTokenList list) where TElement : SyntaxNode;