ImportAdder.AddImportsAsync 方法

定义

重载

AddImportsAsync(Document, OptionSet, CancellationToken)

为文档中找到的命名空间引用添加命名空间导入/using 指令。

AddImportsAsync(Document, SyntaxAnnotation, OptionSet, CancellationToken)

添加命名空间导入/using 指令,用于文档中的子树中用注释的子树中找到的命名空间引用的 SyntaxAnnotation指令。

AddImportsAsync(Document, TextSpan, OptionSet, CancellationToken)

为指定范围内的文档中找到的命名空间引用添加命名空间导入/using 指令。

AddImportsAsync(Document, IEnumerable<TextSpan>, OptionSet, CancellationToken)

为指定范围内的文档中找到的命名空间引用添加命名空间导入/using 指令。

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
Source:
ImportAdder.cs

为文档中找到的命名空间引用添加命名空间导入/using 指令。

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)

参数

document
Document
options
OptionSet
cancellationToken
CancellationToken

返回

适用于

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
Source:
ImportAdder.cs

添加命名空间导入/using 指令,用于文档中的子树中用注释的子树中找到的命名空间引用的 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)

参数

document
Document
annotation
SyntaxAnnotation
options
OptionSet
cancellationToken
CancellationToken

返回

适用于

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
Source:
ImportAdder.cs

为指定范围内的文档中找到的命名空间引用添加命名空间导入/using 指令。

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)

参数

document
Document
span
TextSpan
options
OptionSet
cancellationToken
CancellationToken

返回

适用于

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
Source:
ImportAdder.cs

为指定范围内的文档中找到的命名空间引用添加命名空间导入/using 指令。

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)

参数

document
Document
options
OptionSet
cancellationToken
CancellationToken

返回

适用于