Click or drag to resize

Location Class



A program location in source code.
Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysisLocation

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public abstract class Location

The Location type exposes the following members.

Properties
  NameDescription
Public propertyIsInMetadata
Returns true if the location is in metadata.
Public propertyIsInSource
Returns true if the location represents a specific location in a source code file.
Public propertyKind
Location kind (None/SourceFile/MetadataFile).
Public propertyMetadataModule
Returns the metadata module the location is associated with or null if the module is not available.
Public propertyStatic memberNone
A location of kind LocationKind.None.
Public propertySourceSpan
The location within the syntax tree that this location is associated with.
Public propertySourceTree
The syntax tree this location is located in or null if not in a syntax tree.
Top
Methods
  NameDescription
Public methodStatic memberCreate(SyntaxTree, TextSpan)
Creates an instance of a Location for a span in a SyntaxTree.
Public methodStatic memberCreate(String, TextSpan, LinePositionSpan)
Creates an instance of a Location for a span in a file.
Public methodEquals
Protected methodGetDebuggerDisplay
Public methodGetHashCode
Public methodGetLineSpan
Gets the location in terms of path, line and column.
Public methodGetMappedLineSpan
Gets the location in terms of path, line and column after applying source line mapping directives (
#line
in C# or
#ExternalSource
in VB).
Public methodToString
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Public operatorStatic memberInequality
Top
See Also