CodeAction.Create 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Create(String, ImmutableArray<CodeAction>, Boolean)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
创建表示 CodeAction 一组代码操作的 。
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeActions.CodeAction> nestedActions, bool isInlinable);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeActions.CodeAction> nestedActions, bool isInlinable);
static member Create : string * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeActions.CodeAction> * bool -> Microsoft.CodeAnalysis.CodeActions.CodeAction
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
static member Create : string * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeActions.CodeAction> * bool -> Microsoft.CodeAnalysis.CodeActions.CodeAction
Public Shared Function Create (title As String, nestedActions As ImmutableArray(Of CodeAction), isInlinable As Boolean) As CodeAction
参数
- title
- String
组的 CodeAction 标题。
- nestedActions
- ImmutableArray<CodeAction>
组中的代码操作。
- isInlinable
- Boolean
true
以允许将组成员内联到父级;否则, false
要求此组显示为具有嵌套操作的组。
返回
- 属性
适用于
Create(String, Func<CancellationToken,Task<Document>>, String)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
创建 用于 CodeAction 对单个 Document的更改。 如果更改计算成本高昂,应延迟到请求为止,请使用此工厂。
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> createChangedDocument, string equivalenceKey = default);
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> createChangedDocument, string? equivalenceKey = default);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> createChangedDocument, string? equivalenceKey);
static member Create : string * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> * string -> Microsoft.CodeAnalysis.CodeActions.CodeAction
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
static member Create : string * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> * string -> Microsoft.CodeAnalysis.CodeActions.CodeAction
Public Shared Function Create (title As String, createChangedDocument As Func(Of CancellationToken, Task(Of Document)), Optional equivalenceKey As String = Nothing) As CodeAction
Public Shared Function Create (title As String, createChangedDocument As Func(Of CancellationToken, Task(Of Document)), equivalenceKey As String) As CodeAction
参数
- title
- String
的 CodeAction标题。
- createChangedDocument
- Func<CancellationToken,Task<Document>>
用于创建 的 Document函数。
- equivalenceKey
- String
用于确定 与其他 CodeActions 的等效值的CodeAction可选值。 请参阅 EquivalenceKey。
返回
- 属性
适用于
Create(String, Func<CancellationToken,Task<Solution>>, String)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
创建 一个 CodeAction ,用于对 中的Solution多个Document进行更改。 如果更改计算成本高昂,应延迟到请求为止,请使用此工厂。
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>> createChangedSolution, string equivalenceKey = default);
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>> createChangedSolution, string? equivalenceKey = default);
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>> createChangedSolution, string? equivalenceKey);
static member Create : string * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>> * string -> Microsoft.CodeAnalysis.CodeActions.CodeAction
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
static member Create : string * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>> * string -> Microsoft.CodeAnalysis.CodeActions.CodeAction
Public Shared Function Create (title As String, createChangedSolution As Func(Of CancellationToken, Task(Of Solution)), Optional equivalenceKey As String = Nothing) As CodeAction
Public Shared Function Create (title As String, createChangedSolution As Func(Of CancellationToken, Task(Of Solution)), equivalenceKey As String) As CodeAction
参数
- title
- String
的 CodeAction标题。
- createChangedSolution
- Func<CancellationToken,Task<Solution>>
用于创建 的 Solution函数。
- equivalenceKey
- String
用于确定 与其他 CodeActions 的等效值的CodeAction可选值。 请参阅 EquivalenceKey。
返回
- 属性
适用于
Create(String, ImmutableArray<CodeAction>, Boolean, CodeActionPriority)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
创建表示 CodeAction 一组代码操作的 。
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeActions.CodeAction> nestedActions, bool isInlinable, Microsoft.CodeAnalysis.CodeActions.CodeActionPriority priority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default);
static member Create : string * System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.CodeActions.CodeAction> * bool * Microsoft.CodeAnalysis.CodeActions.CodeActionPriority -> Microsoft.CodeAnalysis.CodeActions.CodeAction
Public Shared Function Create (title As String, nestedActions As ImmutableArray(Of CodeAction), isInlinable As Boolean, Optional priority As CodeActionPriority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default) As CodeAction
参数
- title
- String
组的 CodeAction 标题。
- nestedActions
- ImmutableArray<CodeAction>
组中的代码操作。
- isInlinable
- Boolean
true
以允许将组成员内联到父级;否则, false
要求此组显示为具有嵌套操作的组。
- priority
- CodeActionPriority
代码操作的优先级
返回
适用于
Create(String, Func<IProgress<CodeAnalysisProgress>,CancellationToken,Task<Document>>, String, CodeActionPriority)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<IProgress<Microsoft.CodeAnalysis.CodeAnalysisProgress>,System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> createChangedDocument, string? equivalenceKey = default, Microsoft.CodeAnalysis.CodeActions.CodeActionPriority priority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default);
static member Create : string * Func<IProgress<Microsoft.CodeAnalysis.CodeAnalysisProgress>, System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> * string * Microsoft.CodeAnalysis.CodeActions.CodeActionPriority -> Microsoft.CodeAnalysis.CodeActions.CodeAction
Public Shared Function Create (title As String, createChangedDocument As Func(Of IProgress(Of CodeAnalysisProgress), CancellationToken, Task(Of Document)), Optional equivalenceKey As String = Nothing, Optional priority As CodeActionPriority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default) As CodeAction
参数
- title
- String
- createChangedDocument
- Func<IProgress<CodeAnalysisProgress>,CancellationToken,Task<Document>>
- equivalenceKey
- String
- priority
- CodeActionPriority
代码操作优先级
返回
适用于
Create(String, Func<IProgress<CodeAnalysisProgress>,CancellationToken,Task<Solution>>, String, CodeActionPriority)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
创建 一个 CodeAction ,用于对 中的Solution多个Document进行更改。 如果更改计算成本高昂,应延迟到请求为止,请使用此工厂。
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<IProgress<Microsoft.CodeAnalysis.CodeAnalysisProgress>,System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>> createChangedSolution, string? equivalenceKey = default, Microsoft.CodeAnalysis.CodeActions.CodeActionPriority priority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default);
static member Create : string * Func<IProgress<Microsoft.CodeAnalysis.CodeAnalysisProgress>, System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>> * string * Microsoft.CodeAnalysis.CodeActions.CodeActionPriority -> Microsoft.CodeAnalysis.CodeActions.CodeAction
Public Shared Function Create (title As String, createChangedSolution As Func(Of IProgress(Of CodeAnalysisProgress), CancellationToken, Task(Of Solution)), Optional equivalenceKey As String = Nothing, Optional priority As CodeActionPriority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default) As CodeAction
参数
- title
- String
的 CodeAction标题。
- createChangedSolution
- Func<IProgress<CodeAnalysisProgress>,CancellationToken,Task<Solution>>
用于创建 的 Solution函数。
- equivalenceKey
- String
用于确定 与其他 CodeActions 的等效值的CodeAction可选值。 请参阅 EquivalenceKey。
- priority
- CodeActionPriority
返回
适用于
Create(String, Func<CancellationToken,Task<Document>>, String, CodeActionPriority)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
创建 用于 CodeAction 对单个 Document的更改。 如果更改计算成本高昂,应延迟到请求为止,请使用此工厂。
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> createChangedDocument, string? equivalenceKey = default, Microsoft.CodeAnalysis.CodeActions.CodeActionPriority priority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default);
static member Create : string * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>> * string * Microsoft.CodeAnalysis.CodeActions.CodeActionPriority -> Microsoft.CodeAnalysis.CodeActions.CodeAction
Public Shared Function Create (title As String, createChangedDocument As Func(Of CancellationToken, Task(Of Document)), Optional equivalenceKey As String = Nothing, Optional priority As CodeActionPriority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default) As CodeAction
参数
- title
- String
的 CodeAction标题。
- createChangedDocument
- Func<CancellationToken,Task<Document>>
用于创建 的 Document函数。
- equivalenceKey
- String
用于确定 与其他 CodeActions 的等效值的CodeAction可选值。 请参阅 EquivalenceKey。
- priority
- CodeActionPriority
代码操作优先级
返回
适用于
Create(String, Func<CancellationToken,Task<Solution>>, String, CodeActionPriority)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
创建 一个 CodeAction ,用于对 中的Solution多个Document进行更改。 如果更改计算成本高昂,应延迟到请求为止,请使用此工厂。
public static Microsoft.CodeAnalysis.CodeActions.CodeAction Create (string title, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>> createChangedSolution, string? equivalenceKey = default, Microsoft.CodeAnalysis.CodeActions.CodeActionPriority priority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default);
static member Create : string * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Solution>> * string * Microsoft.CodeAnalysis.CodeActions.CodeActionPriority -> Microsoft.CodeAnalysis.CodeActions.CodeAction
Public Shared Function Create (title As String, createChangedSolution As Func(Of CancellationToken, Task(Of Solution)), Optional equivalenceKey As String = Nothing, Optional priority As CodeActionPriority = Microsoft.CodeAnalysis.CodeActions.CodeActionPriority.Default) As CodeAction
参数
- title
- String
的 CodeAction标题。
- createChangedSolution
- Func<CancellationToken,Task<Solution>>
用于创建 的 Solution函数。
- equivalenceKey
- String
用于确定 与其他 CodeActions 的等效值的CodeAction可选值。 请参阅 EquivalenceKey。
- priority
- CodeActionPriority