SourceLocation Struct

Definition

Specifies a location in a source file.

public value class SourceLocation : IEquatable<Microsoft::VisualStudio::GraphModel::CodeSchema::SourceLocation>
[System.ComponentModel.TypeConverter(typeof(Microsoft.VisualStudio.GraphModel.CodeSchema.SourceLocationTypeConverter))]
public struct SourceLocation : IEquatable<Microsoft.VisualStudio.GraphModel.CodeSchema.SourceLocation>
[<System.ComponentModel.TypeConverter(typeof(Microsoft.VisualStudio.GraphModel.CodeSchema.SourceLocationTypeConverter))>]
type SourceLocation = struct
Public Structure SourceLocation
Implements IEquatable(Of SourceLocation)
Inheritance
SourceLocation
Attributes
Implements

Constructors

SourceLocation(String, Position)

Creates an instance of the SourceLocation with given file name and position in the file.

SourceLocation(String, Position, Position)

Creates an instance of the SourceLocation with given file name and start/end positions in the file.

SourceLocation(Uri, Position)

Creates an instance of the SourceLocation with given file name URI and position in the file.

SourceLocation(Uri, Position, Position)

Creates an instance of the SourceLocation with given file name URI and start/end positions in the file.

Properties

EndPosition

Gets the end location in the file.

FileName

Gets the file name this source location belongs to.

IsValid

Gets true if the source location instance is valid.

StartPosition

Gets the start location in the file.

Methods

CreateGraphNodeId()

Creates graph node id for this source location, which includes the file name and positions as parts.

Equals(Object)

Compares this source location instance with another object for equality.

Equals(SourceLocation)

Compares this source location instance with another source location instance for equality.

GetHashCode()

See GetHashCode().

ToString()

Represents this source location as a string.

Operators

Equality(SourceLocation, SourceLocation)

Compares this source location instance with another source location instance for equality.

Inequality(SourceLocation, SourceLocation)

Compares this source location instance with another source location instance for inequality.

Applies to