SourceLocation Struct

A position in a source file, read from the portable PDB of an assembly.

public readonly struct SourceLocation : IEquatable<SourceLocation>
Implements

Constructors

NameDescription
SourceLocation(string, int, int)A position in a source file, read from the portable PDB of an assembly.

SourceLocation(string, int, int)

A position in a source file, read from the portable PDB of an assembly.

public SourceLocation(string FilePath, int Line, int Column)

Parameters

FilePath string
The path of the source file, as recorded in the PDB when the assembly was compiled.
Line int
The 1-based line.
Column int
The 1-based column.

Properties

NameDescription
ColumnThe 1-based column.
FilePathThe path of the source file, as recorded in the PDB when the assembly was compiled.
LineThe 1-based line.

The 1-based column.

public int Column { get; init; }

Property value

int

The path of the source file, as recorded in the PDB when the assembly was compiled.

public string FilePath { get; init; }

Property value

string

The 1-based line.

public int Line { get; init; }

Property value

int

Methods

NameDescription
Deconstruct(string, int, int)
Equals(SourceLocation)
Equals(object)
GetHashCode()
ToString()Returns the location as path:line:column.

Deconstruct(string, int, int)

public void Deconstruct(out string FilePath, out int Line, out int Column)

Parameters

FilePath string
Line int
Column int

No documentation is available.

Equals overloads

Equals(SourceLocation)

public bool Equals(SourceLocation other)
Parameters
other SourceLocation
Returns

bool

No documentation is available.

Equals(object)

public override bool Equals(object obj)
Parameters
obj object
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

Returns the location as path:line:column.

public override string ToString()

Returns

string The location as path:line:column.

Operators

NameDescription
operator ==(SourceLocation, SourceLocation)
operator !=(SourceLocation, SourceLocation)

operator ==(SourceLocation, SourceLocation)

public static bool operator ==(SourceLocation left, SourceLocation right)

Parameters

left SourceLocation
right SourceLocation

Returns

bool

No documentation is available.

operator !=(SourceLocation, SourceLocation)

public static bool operator !=(SourceLocation left, SourceLocation right)

Parameters

left SourceLocation
right SourceLocation

Returns

bool

No documentation is available.