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

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

int? ArgumentIndex { get; }

Property Value

int?

ArgumentListSnapshotOffset

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

TextSnapshotOffset? ArgumentListSnapshotOffset { get; }

Property Value

TextSnapshotOffset?

ArgumentSnapshotOffset

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

TextSnapshotOffset? ArgumentSnapshotOffset { get; }

Property Value

TextSnapshotOffset?

ContainingAstNode

The IAstNode that contains the SnapshotOffset.

IAstNode? ContainingAstNode { get; }

Property Value

IAstNode

ContainingAstTypeDeclaration

The AST TypeDeclaration that contains the SnapshotOffset, if any.

TypeDeclaration? ContainingAstTypeDeclaration { get; }

Property Value

TypeDeclaration

InitializationSnapshotRange

The TextSnapshotRange with which the context was initialized.

TextSnapshotRange? InitializationSnapshotRange { get; }

Property Value

TextSnapshotRange?

Kind

The DotNetContextKind indicating the kind of context.

DotNetContextKind Kind { get; }

Property Value

DotNetContextKind

Location

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

IDotNetContextLocation? Location { get; }

Property Value

IDotNetContextLocation

ProjectAssembly

The IProjectAssembly with which this context is associated.

IProjectAssembly? ProjectAssembly { get; }

Property Value

IProjectAssembly

SnapshotOffset

The TextSnapshotOffset for which this context was created.

TextSnapshotOffset SnapshotOffset { get; }

Property Value

TextSnapshotOffset

TargetExpression

The target AST Expression for the context, if known.

Expression? TargetExpression { get; }

Property Value

Expression

TargetSnapshotOffset

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

TextSnapshotOffset? TargetSnapshotOffset { get; }

Property Value

TextSnapshotOffset?

Methods

Resolve()

The IResolver on the ProjectAssembly to return an IResolverResultSet.

IResolverResultSet? Resolve()

Returns

IResolverResultSet

Extension Methods