Location.Create Method

Definition

Overloads

Create(SyntaxTree, TextSpan)

Creates an instance of a Location for a span in a SyntaxTree.

Create(String, TextSpan, LinePositionSpan)

Creates an instance of a Location for a span in a file.

Create(String, TextSpan, LinePositionSpan, String, LinePositionSpan)

Creates an instance of a Location for a span in a file with a mapped file and span.

Create(SyntaxTree, TextSpan)

Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs

Creates an instance of a Location for a span in a SyntaxTree.

C#
public static Microsoft.CodeAnalysis.Location Create(Microsoft.CodeAnalysis.SyntaxTree syntaxTree, Microsoft.CodeAnalysis.Text.TextSpan textSpan);

Parameters

syntaxTree
SyntaxTree
textSpan
TextSpan

Returns

Applies to

Roslyn 4.13.0 and other versions
Product Versions
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0

Create(String, TextSpan, LinePositionSpan)

Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs

Creates an instance of a Location for a span in a file.

C#
public static Microsoft.CodeAnalysis.Location Create(string filePath, Microsoft.CodeAnalysis.Text.TextSpan textSpan, Microsoft.CodeAnalysis.Text.LinePositionSpan lineSpan);

Parameters

filePath
String
textSpan
TextSpan
lineSpan
LinePositionSpan

Returns

Applies to

Roslyn 4.13.0 and other versions
Product Versions
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0

Create(String, TextSpan, LinePositionSpan, String, LinePositionSpan)

Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs
Source:
Location.cs

Creates an instance of a Location for a span in a file with a mapped file and span.

C#
public static Microsoft.CodeAnalysis.Location Create(string filePath, Microsoft.CodeAnalysis.Text.TextSpan textSpan, Microsoft.CodeAnalysis.Text.LinePositionSpan lineSpan, string mappedFilePath, Microsoft.CodeAnalysis.Text.LinePositionSpan mappedLineSpan);

Parameters

filePath
String
textSpan
TextSpan
lineSpan
LinePositionSpan
mappedFilePath
String
mappedLineSpan
LinePositionSpan

Returns

Applies to

Roslyn 4.13.0 and other versions
Product Versions
Roslyn 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 4.12.2, 4.13.0