ImportAdder.AddImportsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddImportsAsync(Document, OptionSet, CancellationToken) |
Adds namespace imports / using directives for namespace references found in the document. |
AddImportsAsync(Document, SyntaxAnnotation, OptionSet, CancellationToken) |
Adds namespace imports / using directives for namespace references found in the document within the sub-trees annotated with the SyntaxAnnotation. |
AddImportsAsync(Document, TextSpan, OptionSet, CancellationToken) |
Adds namespace imports / using directives for namespace references found in the document within the span specified. |
AddImportsAsync(Document, IEnumerable<TextSpan>, OptionSet, CancellationToken) |
Adds namespace imports / using directives for namespace references found in the document within the spans specified. |
AddImportsAsync(Document, OptionSet, CancellationToken)
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
Adds namespace imports / using directives for namespace references found in the document.
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> AddImportsAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Options.OptionSet options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> AddImportsAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Options.OptionSet? options = default, System.Threading.CancellationToken cancellationToken = default);
static member AddImportsAsync : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Public Shared Function AddImportsAsync (document As Document, Optional options As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Document)
Parameters
- document
- Document
- options
- OptionSet
- cancellationToken
- CancellationToken
Returns
Applies to
AddImportsAsync(Document, SyntaxAnnotation, OptionSet, CancellationToken)
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
Adds namespace imports / using directives for namespace references found in the document within the sub-trees annotated with the SyntaxAnnotation.
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> AddImportsAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxAnnotation annotation, Microsoft.CodeAnalysis.Options.OptionSet options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> AddImportsAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxAnnotation annotation, Microsoft.CodeAnalysis.Options.OptionSet? options = default, System.Threading.CancellationToken cancellationToken = default);
static member AddImportsAsync : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.SyntaxAnnotation * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Public Shared Function AddImportsAsync (document As Document, annotation As SyntaxAnnotation, Optional options As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Document)
Parameters
- document
- Document
- annotation
- SyntaxAnnotation
- options
- OptionSet
- cancellationToken
- CancellationToken
Returns
Applies to
AddImportsAsync(Document, TextSpan, OptionSet, CancellationToken)
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
Adds namespace imports / using directives for namespace references found in the document within the span specified.
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> AddImportsAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Text.TextSpan span, Microsoft.CodeAnalysis.Options.OptionSet options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> AddImportsAsync (Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.Text.TextSpan span, Microsoft.CodeAnalysis.Options.OptionSet? options = default, System.Threading.CancellationToken cancellationToken = default);
static member AddImportsAsync : Microsoft.CodeAnalysis.Document * Microsoft.CodeAnalysis.Text.TextSpan * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Public Shared Function AddImportsAsync (document As Document, span As TextSpan, Optional options As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Document)
Parameters
- document
- Document
- span
- TextSpan
- options
- OptionSet
- cancellationToken
- CancellationToken
Returns
Applies to
AddImportsAsync(Document, IEnumerable<TextSpan>, OptionSet, CancellationToken)
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
- Source:
- ImportAdder.cs
Adds namespace imports / using directives for namespace references found in the document within the spans specified.
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> AddImportsAsync (Microsoft.CodeAnalysis.Document document, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Text.TextSpan> spans, Microsoft.CodeAnalysis.Options.OptionSet options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> AddImportsAsync (Microsoft.CodeAnalysis.Document document, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Text.TextSpan> spans, Microsoft.CodeAnalysis.Options.OptionSet? options = default, System.Threading.CancellationToken cancellationToken = default);
static member AddImportsAsync : Microsoft.CodeAnalysis.Document * seq<Microsoft.CodeAnalysis.Text.TextSpan> * Microsoft.CodeAnalysis.Options.OptionSet * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Public Shared Function AddImportsAsync (document As Document, spans As IEnumerable(Of TextSpan), Optional options As OptionSet = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Document)
Parameters
- document
- Document
- spans
- IEnumerable<TextSpan>
- options
- OptionSet
- cancellationToken
- CancellationToken