In This Article

IDotNetContext Interface

Provides the base requirements for information about a .NET language context of a certain offset within an ITextSnapshot.

public interface IDotNetContext

Properties

ArgumentIndex

Gets the index of the current argument, if known, when the context is for the containing invocation.

int? ArgumentIndex { get; }

Property Value

int?:

The index of the current argument, if known, when the context is for the containing invocation.

ArgumentListSnapshotOffset

Gets the TextSnapshotOffset of the argument list, if known, when the context is for the containing invocation.

TextSnapshotOffset? ArgumentListSnapshotOffset { get; }

Property Value

TextSnapshotOffset?:

The TextSnapshotOffset of the argument list, if known, when the context is for the containing invocation.

ArgumentSnapshotOffset

Gets the TextSnapshotOffset of the current argument, if known, when the context is for the containing invocation.

TextSnapshotOffset? ArgumentSnapshotOffset { get; }

Property Value

TextSnapshotOffset?:

The TextSnapshotOffset of the current argument, if known, when the context is for the containing invocation.

ContainingAstNode

Gets the IAstNode that contains the SnapshotOffset.

IAstNode ContainingAstNode { get; }

Property Value

IAstNode:

The IAstNode that contains the SnapshotOffset.

ContainingAstTypeDeclaration

Gets the AST TypeDeclaration that contains the SnapshotOffset, if any.

TypeDeclaration ContainingAstTypeDeclaration { get; }

Property Value

TypeDeclaration:

The AST TypeDeclaration that contains the SnapshotOffset, if any.

InitializationSnapshotRange

Gets the TextSnapshotRange with which the context was initialized.

TextSnapshotRange? InitializationSnapshotRange { get; }

Property Value

TextSnapshotRange?:

The TextSnapshotRange with which the context was initialized.

Kind

Gets the DotNetContextKind indicating the kind of context.

DotNetContextKind Kind { get; }

Property Value

DotNetContextKind:

The DotNetContextKind indicating the kind of context.

Location

Gets an optional IDotNetContextLocation that provides more location information about the context.

IDotNetContextLocation Location { get; }

Property Value

IDotNetContextLocation:

An optional IDotNetContextLocation that provides more location information about the context.

ProjectAssembly

Gets the IProjectAssembly with which this context is associated.

IProjectAssembly ProjectAssembly { get; }

Property Value

IProjectAssembly:

The IProjectAssembly with which this context is associated.

SnapshotOffset

Gets the TextSnapshotOffset for which this context was created.

TextSnapshotOffset SnapshotOffset { get; }

Property Value

TextSnapshotOffset:

The TextSnapshotOffset for which this context was created.

TargetExpression

Gets the target AST Expression for the context, if known.

Expression TargetExpression { get; }

Property Value

Expression:

The target AST Expression for the context, if known.

TargetSnapshotOffset

Gets the TextSnapshotOffset, if known, against which to use as context for the resolver.

TextSnapshotOffset? TargetSnapshotOffset { get; }

Property Value

TextSnapshotOffset?:

The TextSnapshotOffset, if known, against which to use as context for the resolver.

Methods

Resolve()

Uses the IResolver on the ProjectAssembly to return an IResolverResultSet.

IResolverResultSet Resolve()

Returns

IResolverResultSet:

The IResolverResultSet that was returned by the resolver.