SubpatternSyntax Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public sealed class SubpatternSyntax : Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode
type SubpatternSyntax = class
inherit CSharpSyntaxNode
Public NotInheritable Class SubpatternSyntax
Inherits CSharpSyntaxNode
- Inheritance
Remarks
This node is associated with the following syntax kinds:
Properties
ContainsAnnotations |
Determines whether this node or any sub node, token or trivia has annotations. (Inherited from SyntaxNode) |
ContainsDiagnostics |
Determines whether this node or any of its descendant nodes, tokens or trivia have any diagnostics on them. (Inherited from SyntaxNode) |
ContainsDirectives |
Determines whether this node has any descendant preprocessor directives. (Inherited from SyntaxNode) |
ContainsSkippedText |
Determines whether this node has any descendant skipped text. (Inherited from SyntaxNode) |
ExpressionColon | |
FullSpan |
The absolute span of this node in characters, including its leading and trailing trivia. (Inherited from SyntaxNode) |
HasLeadingTrivia |
Determines whether this node has any leading trivia. (Inherited from SyntaxNode) |
HasStructuredTrivia |
Determines whether a descendant trivia of this node is structured. (Inherited from SyntaxNode) |
HasTrailingTrivia |
Determines whether this node has any trailing trivia. (Inherited from SyntaxNode) |
IsMissing |
Determines whether the node represents a language construct that was actually parsed from the source code. Missing nodes are generated by the parser in error scenarios to represent constructs that should have been present in the source code in order to compile successfully but were actually missing. (Inherited from SyntaxNode) |
IsStructuredTrivia |
Determines whether this node represents a structured trivia. (Inherited from SyntaxNode) |
KindText | (Inherited from SyntaxNode) |
Language |
The language name that this node is syntax of. (Inherited from CSharpSyntaxNode) |
NameColon | |
Parent |
The node that contains this node in its ChildNodes() collection. (Inherited from SyntaxNode) |
ParentTrivia | (Inherited from SyntaxNode) |
Pattern | |
RawKind |
An integer representing the language specific kind of this node. (Inherited from SyntaxNode) |
Span |
The absolute span of this node in characters, not including its leading and trailing trivia. (Inherited from SyntaxNode) |
SpanStart |
Same as accessing Start on Span. (Inherited from SyntaxNode) |
SyntaxTree |
Returns SyntaxTree that owns the node. (Inherited from SyntaxNode) |
SyntaxTreeCore | (Inherited from CSharpSyntaxNode) |
Methods
Accept(CSharpSyntaxVisitor) | |
Accept<TResult>(CSharpSyntaxVisitor<TResult>) | |
Ancestors(Boolean) |
Gets a list of ancestor nodes (Inherited from SyntaxNode) |
AncestorsAndSelf(Boolean) |
Gets a list of ancestor nodes (including this node) (Inherited from SyntaxNode) |
ChildNodes() |
Gets a list of the child nodes in prefix document order. (Inherited from SyntaxNode) |
ChildNodesAndTokens() |
The list of child nodes and tokens of this node, where each element is a SyntaxNodeOrToken instance. (Inherited from SyntaxNode) |
ChildThatContainsPosition(Int32) | (Inherited from SyntaxNode) |
ChildTokens() |
Gets a list of the direct child tokens of this node. (Inherited from SyntaxNode) |
Contains(SyntaxNode) |
Determines if the specified node is a descendant of this node. Returns true for current node. (Inherited from SyntaxNode) |
ContainsDirective(Int32) |
Returns true if this node contains any directives (e.g. |
CopyAnnotationsTo<T>(T) |
Copies all SyntaxAnnotations, if any, from this SyntaxNode instance and attaches them to a new instance based on |
DescendantNodes(Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of descendant nodes in prefix document order. (Inherited from SyntaxNode) |
DescendantNodes(TextSpan, Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of descendant nodes in prefix document order. (Inherited from SyntaxNode) |
DescendantNodesAndSelf(Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of descendant nodes (including this node) in prefix document order. (Inherited from SyntaxNode) |
DescendantNodesAndSelf(TextSpan, Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of descendant nodes (including this node) in prefix document order. (Inherited from SyntaxNode) |
DescendantNodesAndTokens(Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of descendant nodes and tokens in prefix document order. (Inherited from SyntaxNode) |
DescendantNodesAndTokens(TextSpan, Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of the descendant nodes and tokens in prefix document order. (Inherited from SyntaxNode) |
DescendantNodesAndTokensAndSelf(Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of descendant nodes and tokens (including this node) in prefix document order. (Inherited from SyntaxNode) |
DescendantNodesAndTokensAndSelf(TextSpan, Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of the descendant nodes and tokens (including this node) in prefix document order. (Inherited from SyntaxNode) |
DescendantTokens(Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of all the tokens in the span of this node. (Inherited from SyntaxNode) |
DescendantTokens(TextSpan, Func<SyntaxNode,Boolean>, Boolean) |
Gets a list of all the tokens in the full span of this node. (Inherited from SyntaxNode) |
DescendantTrivia(Func<SyntaxNode,Boolean>, Boolean) |
Get a list of all the trivia associated with the descendant nodes and tokens. (Inherited from SyntaxNode) |
DescendantTrivia(TextSpan, Func<SyntaxNode,Boolean>, Boolean) |
Get a list of all the trivia associated with the descendant nodes and tokens. (Inherited from SyntaxNode) |
EquivalentToCore(SyntaxNode) |
Determine if this node is structurally equivalent to another. (Inherited from CSharpSyntaxNode) |
FindNode(TextSpan, Boolean, Boolean) |
Finds the node with the smallest FullSpan that contains |
FindToken(Int32, Boolean) |
Finds a token according to the following rules:
|
FindTokenCore(Int32, Boolean) |
Finds a descendant token of this node whose span includes the supplied position. (Inherited from SyntaxNode) |
FindTokenCore(Int32, Func<SyntaxTrivia,Boolean>) |
Finds a descendant token of this node whose span includes the supplied position. (Inherited from SyntaxNode) |
FindTrivia(Int32, Boolean) |
Finds a descendant trivia of this node whose span includes the supplied position. (Inherited from CSharpSyntaxNode) |
FindTrivia(Int32, Func<SyntaxTrivia,Boolean>) |
Finds a descendant trivia of this node at the specified position, where the position is within the span of the node. (Inherited from CSharpSyntaxNode) |
FindTriviaCore(Int32, Boolean) |
Finds a descendant trivia of this node whose span includes the supplied position. (Inherited from SyntaxNode) |
FirstAncestorOrSelf<TNode,TArg>(Func<TNode,TArg,Boolean>, TArg, Boolean) |
Gets the first node of type TNode that matches the predicate. (Inherited from SyntaxNode) |
FirstAncestorOrSelf<TNode>(Func<TNode,Boolean>, Boolean) |
Gets the first node of type TNode that matches the predicate. (Inherited from SyntaxNode) |
GetAnnotatedNodes(String) |
Gets all nodes with the specified annotation kind. (Inherited from SyntaxNode) |
GetAnnotatedNodes(SyntaxAnnotation) |
Gets all nodes with the specified annotation. (Inherited from SyntaxNode) |
GetAnnotatedNodesAndTokens(String) |
Gets all nodes and tokens with an annotation of the specified annotation kind. (Inherited from SyntaxNode) |
GetAnnotatedNodesAndTokens(String[]) |
Gets all nodes and tokens with an annotation of the specified annotation kinds. (Inherited from SyntaxNode) |
GetAnnotatedNodesAndTokens(SyntaxAnnotation) |
Gets all nodes and tokens with the specified annotation. (Inherited from SyntaxNode) |
GetAnnotatedTokens(String) |
Gets all tokens with the specified annotation kind. (Inherited from SyntaxNode) |
GetAnnotatedTokens(SyntaxAnnotation) |
Gets all tokens with the specified annotation. (Inherited from SyntaxNode) |
GetAnnotatedTrivia(String) |
Gets all trivia with an annotation of the specified annotation kind. (Inherited from SyntaxNode) |
GetAnnotatedTrivia(String[]) |
Gets all trivia with an annotation of the specified annotation kinds. (Inherited from SyntaxNode) |
GetAnnotatedTrivia(SyntaxAnnotation) |
Gets all trivia with the specified annotation. (Inherited from SyntaxNode) |
GetAnnotations(IEnumerable<String>) |
Gets all the annotations with the specified annotation kinds. (Inherited from SyntaxNode) |
GetAnnotations(String) |
Gets all the annotations with the specified annotation kind. (Inherited from SyntaxNode) |
GetDiagnostics() |
Gets a list of all the diagnostics in the sub tree that has this node as its root. This method does not filter diagnostics based on #pragmas and compiler options like nowarn, warnaserror etc. (Inherited from CSharpSyntaxNode) |
GetFirstDirective(Func<DirectiveTriviaSyntax,Boolean>) |
Gets the first directive of the tree rooted by this node. (Inherited from CSharpSyntaxNode) |
GetFirstToken(Boolean, Boolean, Boolean, Boolean) |
Gets the first token of the tree rooted by this node. (Inherited from CSharpSyntaxNode) |
GetLastDirective(Func<DirectiveTriviaSyntax,Boolean>) |
Gets the last directive of the tree rooted by this node. (Inherited from CSharpSyntaxNode) |
GetLastToken(Boolean, Boolean, Boolean, Boolean) |
Gets the last non-zero-width token of the tree rooted by this node. (Inherited from CSharpSyntaxNode) |
GetLeadingTrivia() |
The list of trivia that appears before this node in the source code. (Inherited from CSharpSyntaxNode) |
GetLocation() |
Gets a Location for this node. (Inherited from CSharpSyntaxNode) |
GetRed<T>(T, Int32) | (Inherited from SyntaxNode) |
GetRedAtZero<T>(T) | (Inherited from SyntaxNode) |
GetReference() |
Gets a SyntaxReference for this syntax node. CommonSyntaxReferences can be used to regain access to a syntax node without keeping the entire tree and source text in memory. (Inherited from SyntaxNode) |
GetText(Encoding, SourceHashAlgorithm) |
Gets the full text of this node as a new SourceText instance. (Inherited from SyntaxNode) |
GetTrailingTrivia() |
The list of trivia that appears after this node in the source code. (Inherited from CSharpSyntaxNode) |
HasAnnotation(SyntaxAnnotation) |
Determines whether this node has the specific annotation. (Inherited from SyntaxNode) |
HasAnnotations(IEnumerable<String>) |
Determines whether this node has any annotations with any of the specific annotation kinds. (Inherited from SyntaxNode) |
HasAnnotations(String) |
Determines whether this node has any annotations with the specific annotation kind. (Inherited from SyntaxNode) |
InsertNodesInListCore(SyntaxNode, IEnumerable<SyntaxNode>, Boolean) | (Inherited from CSharpSyntaxNode) |
InsertTokensInListCore(SyntaxToken, IEnumerable<SyntaxToken>, Boolean) | (Inherited from CSharpSyntaxNode) |
InsertTriviaInListCore(SyntaxTrivia, IEnumerable<SyntaxTrivia>, Boolean) | (Inherited from CSharpSyntaxNode) |
IsEquivalentTo(SyntaxNode) |
Determine whether this node is structurally equivalent to another. (Inherited from SyntaxNode) |
IsEquivalentTo(SyntaxNode, Boolean) |
Determines if two nodes are the same, disregarding trivia differences. (Inherited from SyntaxNode) |
IsEquivalentToCore(SyntaxNode, Boolean) | (Inherited from CSharpSyntaxNode) |
IsIncrementallyIdenticalTo(SyntaxNode) |
Returns true if these two nodes are considered "incrementally identical". An incrementally identical node occurs when a SyntaxTree is incrementally parsed using WithChangedText(SourceText) and the incremental parser is able to take the node from the original tree and use it in its entirety in the new tree. In this case, the ToFullString() of each node will be the same, though they could have different parents, and may occur at different positions in their respective trees. If two nodes are incrementally identical, all children of each node will be incrementally identical as well. (Inherited from SyntaxNode) |
IsPartOfStructuredTrivia() |
Determines whether this node is a descendant of a structured trivia. (Inherited from SyntaxNode) |
Kind() |
Returns the SyntaxKind of the node. (Inherited from CSharpSyntaxNode) |
NormalizeWhitespaceCore(String, String, Boolean) | (Inherited from CSharpSyntaxNode) |
RemoveNodesCore(IEnumerable<SyntaxNode>, SyntaxRemoveOptions) | (Inherited from CSharpSyntaxNode) |
ReplaceCore<TNode>(IEnumerable<TNode>, Func<TNode,TNode,SyntaxNode>, IEnumerable<SyntaxToken>, Func<SyntaxToken,SyntaxToken,SyntaxToken>, IEnumerable<SyntaxTrivia>, Func<SyntaxTrivia,SyntaxTrivia,SyntaxTrivia>) | (Inherited from CSharpSyntaxNode) |
ReplaceNodeInListCore(SyntaxNode, IEnumerable<SyntaxNode>) | (Inherited from CSharpSyntaxNode) |
ReplaceTokenInListCore(SyntaxToken, IEnumerable<SyntaxToken>) | (Inherited from CSharpSyntaxNode) |
ReplaceTriviaInListCore(SyntaxTrivia, IEnumerable<SyntaxTrivia>) | (Inherited from CSharpSyntaxNode) |
SerializeTo(Stream, CancellationToken) |
Obsolete.
Obsolete.
Serializes the node to the given |
ToFullString() |
Returns full string representation of this node including its leading and trailing trivia. (Inherited from SyntaxNode) |
ToString() |
Returns the string representation of this node, not including its leading and trailing trivia. (Inherited from SyntaxNode) |
Update(BaseExpressionColonSyntax, PatternSyntax) | |
Update(NameColonSyntax, PatternSyntax) | |
WithExpressionColon(BaseExpressionColonSyntax) | |
WithNameColon(NameColonSyntax) | |
WithPattern(PatternSyntax) | |
WriteTo(TextWriter) |
Writes the full text of this node to the specified TextWriter. (Inherited from SyntaxNode) |
Explicit Interface Implementations
IFormattable.ToString(String, IFormatProvider) | (Inherited from CSharpSyntaxNode) |
Extension Methods
GetFirstDirective(SyntaxNode, Func<DirectiveTriviaSyntax,Boolean>) |
Gets the first directive of the tree rooted by this node. |
GetLastDirective(SyntaxNode, Func<DirectiveTriviaSyntax,Boolean>) |
Gets the last directive of the tree rooted by this node. |
Kind(SyntaxNode) |
Returns SyntaxKind for SyntaxNode from RawKind property. |
TryGetInferredMemberName(SyntaxNode) |
Given an initializer expression infer the name of anonymous property or tuple element. Returns null if unsuccessful |
ContainsDirective(SyntaxNode, SyntaxKind) |
Returns true if this node contains any directives (e.g. |
IsKind(SyntaxNode, SyntaxKind) |
Determines if SyntaxNode is of a specified kind. |
GetCurrentNode<TNode>(SyntaxNode, TNode) |
Gets the node within the subtree corresponding to the original tracked node. Use TrackNodes to start tracking nodes. |
GetCurrentNodes<TNode>(SyntaxNode, TNode) |
Gets the nodes within the subtree corresponding to the original tracked node. Use TrackNodes to start tracking nodes. |
GetCurrentNodes<TNode>(SyntaxNode, IEnumerable<TNode>) |
Gets the nodes within the subtree corresponding to the original tracked nodes. Use TrackNodes to start tracking nodes. |
TryGetInferredMemberName(SyntaxNode) |
Given an initializer expression infer the name of anonymous property or tuple element. Returns Nothing if unsuccessful |
GetDirectives(SyntaxNode, Func<DirectiveTriviaSyntax,Boolean>) |
Gets the DirectiveTriviaSyntax items for a specified SyntaxNode with optional filtering. |
GetFirstDirective(SyntaxNode, Func<DirectiveTriviaSyntax,Boolean>) |
Gets the first DirectiveTriviaSyntax item for a specified SyntaxNode. |
GetLastDirective(SyntaxNode, Func<DirectiveTriviaSyntax,Boolean>) |
Gets the last DirectiveTriviaSyntax item for a specified SyntaxNode. |
Kind(SyntaxNode) |
Returns SyntaxKind for SyntaxNode from RawKind property. |
ContainsDirective(SyntaxNode, SyntaxKind) |
Returns true if this node contains any directives (e.g. |
IsKind(SyntaxNode, SyntaxKind) |
Determines if SyntaxNode is of a specified kind. |
Applies to
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla