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?)
Initializes a new instance of the SourceFileLocation
class.
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
Gets the unique key that identifies the source file, which is generally a full file path or GUID.
public string Key { get; }
Property Value
- string:
The unique key that identifies the source file, which is generally a full file path or GUID.
NavigationOffset
Gets 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?:
The optional offset within the source code file where navigations to the definition should occur, generally the start of the type/member name.
TextRange
Gets the offset range within the source code file of the type/member definition.
public TextRange TextRange { get; }
Property Value
- TextRange:
The offset range within the source code file of the type/member definition.
Methods
ToString()
Returns a String
that represents the current Object
.