In This Article

SourceFileLocation Class

Represents a source code file location, consisting of a file reference and related offsets within that file, generally used to denote where a type/member was defined.

public class SourceFileLocation : ISourceFileLocation, IKeyedObject
Inheritance:
object object
Implements:
ISourceFileLocation IKeyedObject

Constructors

SourceFileLocation(string?, TextRange?, int?)

Represents a source code file location, consisting of a file reference and related offsets within that file, generally used to denote where a type/member was defined.

public SourceFileLocation(string? key, TextRange? textRange, int? navigationOffset)
Parameter Type Description
key string

The unique key that identifies the source file, which is generally a full file path or GUID.

textRange TextRange?

The offset range within the source code file of the type/member definition.

navigationOffset int?

The optional offset within the source code file where navigations to the definition should occur, generally the start of the type/member name.

Properties

Key

The unique key that identifies the source file, which is generally a full file path or GUID.

public string? Key { get; }

Property Value

string

NavigationOffset

The optional offset within the source code file where navigations to the definition should occur, generally the start of the type/member name.

public int? NavigationOffset { get; }

Property Value

int?

TextRange

The offset range within the source code file of the type/member definition.

public TextRange? TextRange { get; }

Property Value

TextRange?

Methods

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Inherited Members

Extension Methods