Skip to main content

SeparatedSyntaxList<TNode> Struct Extensions

Extension MethodSummary
All<TNode>(SeparatedSyntaxList<TNode>, Func<TNode, Boolean>)Returns true if all nodes in a list matches the predicate.
Any<TNode>(SeparatedSyntaxList<TNode>, Func<TNode, Boolean>)Returns true if any node in a list matches the predicate.
Contains<TNode>(SeparatedSyntaxList<TNode>, SyntaxKind)Searches for a node of the specified kind and returns the zero-based index of the first occurrence within the entire SeparatedSyntaxList<TNode>.
Contains<TNode>(SeparatedSyntaxList<TNode>, TNode)Returns true if the specified node is in the SeparatedSyntaxList<TNode>.
Find<TNode>(SeparatedSyntaxList<TNode>, SyntaxKind)Searches for a node of the specified kind and returns the first occurrence within the entire SeparatedSyntaxList<TNode>.
GetTrailingSeparator<TNode>(SeparatedSyntaxList<TNode>)Returns the trailing separator, if any.
HasTrailingSeparator<TNode>(SeparatedSyntaxList<TNode>)Returns true if the specified list contains trailing separator.
IsFirst<TNode>(SeparatedSyntaxList<TNode>, TNode)Returns true if the specified node is a first node in the list.
IsLast<TNode>(SeparatedSyntaxList<TNode>, TNode)Returns true if the specified node is a last node in the list.
LastIndexOf<TNode>(SeparatedSyntaxList<TNode>, SyntaxKind)Searches for a node of the specified kind and returns the zero-based index of the last occurrence within the entire SeparatedSyntaxList<TNode>.
RemoveRange<TNode>(SeparatedSyntaxList<TNode>, Int32, Int32)Creates a new list with elements in the specified range removed.
ReplaceAt<TNode>(SeparatedSyntaxList<TNode>, Int32, TNode)Creates a new list with a node at the specified index replaced with a new node.
ReplaceRange<TNode>(SeparatedSyntaxList<TNode>, Int32, Int32, IEnumerable<TNode>)Creates a new list with the elements in the specified range replaced with new nodes.
ReplaceRange<TNode>(SeparatedSyntaxList<TNode>, Int32, Int32, TNode)Creates a new list with the elements in the specified range replaced with new node.
TrimTrivia<TNode>(SeparatedSyntaxList<TNode>)Removes all leading whitespace from the leading trivia of the first node in a list and all trailing whitespace from the trailing trivia of the last node in a list and returns a new list with the new trivia. SyntaxKind.WhitespaceTrivia and SyntaxKind.EndOfLineTrivia is considered to be a whitespace.
WithTriviaFrom<TNode>(SeparatedSyntaxList<TNode>, SyntaxNode)Creates a new separated list with both leading and trailing trivia of the specified node. If the list contains more than one item, first item is updated with leading trivia and last item is updated with trailing trivia.