In This Article

DotNetContextFactoryBase Class

Provides an abstract base class that can create IDotNetContext objects for a TextSnapshotOffset.

public abstract class DotNetContextFactoryBase
Inheritance:
object object
Derived:
CSharpContextFactory VBContextFactory

Constructors

DotNetContextFactoryBase()

Initializes an instance of the class.

protected DotNetContextFactoryBase()

Methods

CreateContext(TextSnapshotOffset)

Creates an IDotNetContext for the specified TextSnapshotOffset.

public IDotNetContext CreateContext(TextSnapshotOffset snapshotOffset)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset for which to create a context.

Returns

IDotNetContext:

The IDotNetContext that was created.

CreateContext(TextSnapshotOffset, DotNetContextKind)

Creates an IDotNetContext for the specified TextSnapshotOffset.

public abstract IDotNetContext CreateContext(TextSnapshotOffset snapshotOffset, DotNetContextKind kind)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset for which to create a context.

kind DotNetContextKind

A DotNetContextKind indicating the kind of context.

Returns

IDotNetContext:

The IDotNetContext that was created.

GetContainingAstNode(IDotNetParseData, TextSnapshotOffset)

Returns the IAstNode that contains the specified offset.

protected IAstNode GetContainingAstNode(IDotNetParseData parseData, TextSnapshotOffset snapshotOffset)
Parameter Type Description
parseData IDotNetParseData

The IDotNetParseData to examine.

snapshotOffset TextSnapshotOffset

The TextSnapshotOffset to examine.

Returns

IAstNode:

The IAstNode that contains the specified offset.

IsQualifiedName(Expression)

Returns whether the specified Expression can equate to a qualified name.

protected bool IsQualifiedName(Expression expression)
Parameter Type Description
expression Expression

The Expression to examine.

Returns

bool:

true if the specified Expression can equate to a qualified name; otherwise, false.

TranslateToParseDataSnapshot(IDotNetParseData, TextSnapshotOffset)

Translates the specified snapshot offset to the parse data's Snapshot, if possible, prior to containing AST node lookup.

protected virtual TextSnapshotOffset TranslateToParseDataSnapshot(IDotNetParseData parseData, TextSnapshotOffset snapshotOffset)
Parameter Type Description
parseData IDotNetParseData

The IDotNetParseData to examine.

snapshotOffset TextSnapshotOffset

The TextSnapshotOffset to translate.

Returns

TextSnapshotOffset:

The translated offset.

Inherited Members