Compartir a través de


CSharpExtensions.GetSpeculativeTypeInfo Method

Definition

Binds the expression in the context of the specified location and gets type information. This method is used to get type information about an expression that did not actually appear in the source code.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::CodeAnalysis::TypeInfo GetSpeculativeTypeInfo(Microsoft::CodeAnalysis::SemanticModel ^ semanticModel, int position, Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ expression, Microsoft::CodeAnalysis::SpeculativeBindingOption bindingOption);
public static Microsoft.CodeAnalysis.TypeInfo GetSpeculativeTypeInfo (this Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption);
public static Microsoft.CodeAnalysis.TypeInfo GetSpeculativeTypeInfo (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, int position, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption);
static member GetSpeculativeTypeInfo : Microsoft.CodeAnalysis.SemanticModel * int * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SpeculativeBindingOption -> Microsoft.CodeAnalysis.TypeInfo
<Extension()>
Public Function GetSpeculativeTypeInfo (semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As TypeInfo

Parameters

semanticModel
SemanticModel
position
Int32
expression
ExpressionSyntax
bindingOption
SpeculativeBindingOption

Returns

Applies to