SourceLocation Structure

Specifies a location in a source file.

Namespace:  Microsoft.VisualStudio.GraphModel.CodeSchema
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)

Syntax

'Declaration
<TypeConverterAttribute(GetType(SourceLocationTypeConverter))> _
Public Structure SourceLocation _
    Implements IEquatable(Of SourceLocation)
[TypeConverterAttribute(typeof(SourceLocationTypeConverter))]
public struct SourceLocation : IEquatable<SourceLocation>
[TypeConverterAttribute(typeof(SourceLocationTypeConverter))]
public value class SourceLocation : IEquatable<SourceLocation>
[<Sealed>]
[<TypeConverterAttribute(typeof(SourceLocationTypeConverter))>]
type SourceLocation =  
    struct 
        interface IEquatable<SourceLocation>
    end
JScript supports the use of structures, but not the declaration of new ones.

The SourceLocation type exposes the following members.

Constructors

  Name Description
Public method SourceLocation(String, Position) Creates an instance of the SourceLocation with the given file name and position in the file.
Public method SourceLocation(Uri, Position) Creates an instance of the SourceLocation with the given file name URI and position in the file.
Public method SourceLocation(String, Position, Position) Creates an instance of the SourceLocation with the given file name and start/end positions in the file.
Public method SourceLocation(Uri, Position, Position) Creates an instance of the SourceLocation with the given file name URI and start/end positions in the file.

Top

Properties

  Name Description
Public property EndPosition Gets the end location in the file.
Public property FileName Gets the file name this source location belongs to.
Public property IsValid Gets true if the source location instance is valid.
Public property StartPosition Gets the start location in the file.

Top

Methods

  Name Description
Public method CreateGraphNodeId Creates graph node ID for this source location, which includes the file name and positions as parts.
Public method Equals(Object) Compares this source location instance with another object for equality. (Overrides ValueType.Equals(Object).)
Public method Equals(SourceLocation) Compares this source location instance with another source location instance for equality.
Public method GetHashCode See GetHashCode. (Overrides ValueType.GetHashCode.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ToString Represents this source location as a string. (Overrides ValueType.ToString.)

Top

Operators

  Name Description
Public operatorStatic member Equality Compares this source location instance with another source location instance for equality.
Public operatorStatic member Inequality Compares this source location instance with another source location instance for inequality.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.GraphModel.CodeSchema Namespace