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
Добавляет импорт пространства имен или директив 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
Добавляет директивы импорта пространства имен и директив 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
Добавляет импорт пространства имен и директив 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
Добавляет директивы импорта пространства имен и директив 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
- spans
- IEnumerable<TextSpan>
- options
- OptionSet
- cancellationToken
- CancellationToken