ISymbol.DeclaringSyntaxReferences Property
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.
Get the syntax node(s) where this symbol was declared in source. Some symbols (for example, partial classes) may be defined in more than one location. This property should return one or more syntax nodes only if the symbol was declared in source code and also was not implicitly declared (see the IsImplicitlyDeclared property).
Note that for namespace symbol, the declaring syntax might be declaring a nested namespace. For example, the declaring syntax node for N1 in "namespace N1.N2 {...}" is the entire NamespaceDeclarationSyntax for N1.N2. For the global namespace, the declaring syntax will be the CompilationUnitSyntax.
public:
property System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::SyntaxReference ^> DeclaringSyntaxReferences { System::Collections::Immutable::ImmutableArray<Microsoft::CodeAnalysis::SyntaxReference ^> get(); };
public System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxReference> DeclaringSyntaxReferences { get; }
member this.DeclaringSyntaxReferences : System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxReference>
Public ReadOnly Property DeclaringSyntaxReferences As ImmutableArray(Of SyntaxReference)
Property Value
The syntax node(s) that declared the symbol. If the symbol was declared in metadata or was implicitly declared, returns an empty read-only array.