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 | |
---|---|---|
SourceLocation(String, Position) | Creates an instance of the SourceLocation with the given file name and position in the file. | |
SourceLocation(Uri, Position) | Creates an instance of the SourceLocation with the given file name URI and position in the file. | |
SourceLocation(String, Position, Position) | Creates an instance of the SourceLocation with the given file name and start/end positions in the file. | |
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 | |
---|---|---|
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. |
Top
Methods
Name | Description | |
---|---|---|
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. (Overrides ValueType.Equals(Object).) | |
Equals(SourceLocation) | Compares this source location instance with another source location instance for equality. | |
GetHashCode | See GetHashCode. (Overrides ValueType.GetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Represents this source location as a string. (Overrides ValueType.ToString.) |
Top
Operators
Name | Description | |
---|---|---|
Equality | Compares this source location instance with another source location instance for equality. | |
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.