Skip to main content

SemanticModel Class Extensions

Extension MethodSummary
DetermineParameter(SemanticModel, ArgumentSyntax, Boolean, Boolean, CancellationToken)Determines a parameter symbol that matches to the specified argument. Returns null if no matching parameter is found.
DetermineParameter(SemanticModel, AttributeArgumentSyntax, Boolean, Boolean, CancellationToken)Determines a parameter symbol that matches to the specified attribute argument. Returns null if not matching parameter is found.
GetEnclosingNamedType(SemanticModel, Int32, CancellationToken)Returns the innermost named type symbol that the specified position is considered inside of.
GetEnclosingSymbol<TSymbol>(SemanticModel, Int32, CancellationToken)Returns the innermost symbol of type TSymbol that the specified position is considered inside of.
GetExtensionMethodInfo(SemanticModel, ExpressionSyntax, CancellationToken)Returns what extension method symbol, if any, the specified expression syntax bound to.
GetMethodSymbol(SemanticModel, ExpressionSyntax, CancellationToken)Returns method symbol, if any, the specified expression syntax bound to.
GetReducedExtensionMethodInfo(SemanticModel, ExpressionSyntax, CancellationToken)Returns what extension method symbol, if any, the specified expression syntax bound to.
GetSymbol(SemanticModel, AttributeSyntax, CancellationToken)Returns what symbol, if any, the specified attribute syntax bound to.
GetSymbol(SemanticModel, ConstructorInitializerSyntax, CancellationToken)Returns what symbol, if any, the specified constructor initializer syntax bound to.
GetSymbol(SemanticModel, CrefSyntax, CancellationToken)Returns what symbol, if any, the specified cref syntax bound to.
GetSymbol(SemanticModel, ExpressionSyntax, CancellationToken)Returns what symbol, if any, the specified expression syntax bound to.
GetSymbol(SemanticModel, OrderingSyntax, CancellationToken)Returns what symbol, if any, the specified ordering syntax bound to.
GetSymbol(SemanticModel, SelectOrGroupClauseSyntax, CancellationToken)Returns what symbol, if any, the specified select or group clause bound to.
GetSymbol(SemanticModel, SyntaxNode, CancellationToken)Returns what symbol, if any, the specified node bound to.
GetTypeByMetadataName(SemanticModel, String)Returns the type within the compilation's assembly using its canonical CLR metadata name.
GetTypeSymbol(SemanticModel, AttributeSyntax, CancellationToken)Returns type information about an attribute syntax.
GetTypeSymbol(SemanticModel, ConstructorInitializerSyntax, CancellationToken)Returns type information about a constructor initializer syntax.
GetTypeSymbol(SemanticModel, ExpressionSyntax, CancellationToken)Returns type information about an expression syntax.
GetTypeSymbol(SemanticModel, SelectOrGroupClauseSyntax, CancellationToken)Returns type information about a select or group clause.
GetTypeSymbol(SemanticModel, SyntaxNode, CancellationToken)Returns type information about the specified node.
HasConstantValue(SemanticModel, ExpressionSyntax, CancellationToken)Returns true if the specified node has a constant value.
IsDefaultValue(SemanticModel, ITypeSymbol, ExpressionSyntax, CancellationToken)Returns true if the specified expression represents default value of the specified type.