Udostępnij za pośrednictwem


CodeAction.Create Method

Definition

Overloads

Create(String, ImmutableArray<CodeAction>, Boolean)

Creates a CodeAction representing a group of code actions.

Create(String, Func<CancellationToken,Task<Document>>, String)

Creates a CodeAction for a change to a single Document. Use this factory when the change is expensive to compute and should be deferred until requested.

Create(String, Func<CancellationToken,Task<Solution>>, String)

Creates a CodeAction for a change to more than one Document within a Solution. Use this factory when the change is expensive to compute and should be deferred until requested.

Create(String, ImmutableArray<CodeAction>, Boolean, CodeActionPriority)

Creates a CodeAction representing a group of code actions.

Create(String, Func<IProgress<CodeAnalysisProgress>,CancellationToken,Task<Document>>, String, CodeActionPriority)
Create(String, Func<IProgress<CodeAnalysisProgress>,CancellationToken,Task<Solution>>, String, CodeActionPriority)

Creates a CodeAction for a change to more than one Document within a Solution. Use this factory when the change is expensive to compute and should be deferred until requested.

Create(String, Func<CancellationToken,Task<Document>>, String, CodeActionPriority)

Creates a CodeAction for a change to a single Document. Use this factory when the change is expensive to compute and should be deferred until requested.

Create(String, Func<CancellationToken,Task<Solution>>, String, CodeActionPriority)

Creates a CodeAction for a change to more than one Document within a Solution. Use this factory when the change is expensive to compute and should be deferred until requested.

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

Creates a CodeAction representing a group of code actions.

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

Parameters

title
String

Title of the CodeAction group.

nestedActions
ImmutableArray<CodeAction>

The code actions within the group.

isInlinable
Boolean

true to allow inlining the members of the group into the parent; otherwise, false to require that this group appear as a group with nested actions.

Returns

Attributes

Applies to

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

Creates a CodeAction for a change to a single Document. Use this factory when the change is expensive to compute and should be deferred until requested.

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

Parameters

title
String

Title of the CodeAction.

createChangedDocument
Func<CancellationToken,Task<Document>>

Function to create the Document.

equivalenceKey
String

Optional value used to determine the equivalence of the CodeAction with other CodeActions. See EquivalenceKey.

Returns

Attributes

Applies to

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

Creates a CodeAction for a change to more than one Document within a Solution. Use this factory when the change is expensive to compute and should be deferred until requested.

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

Parameters

title
String

Title of the CodeAction.

createChangedSolution
Func<CancellationToken,Task<Solution>>

Function to create the Solution.

equivalenceKey
String

Optional value used to determine the equivalence of the CodeAction with other CodeActions. See EquivalenceKey.

Returns

Attributes

Applies to

Create(String, ImmutableArray<CodeAction>, Boolean, CodeActionPriority)

Source:
CodeAction.cs
Source:
CodeAction.cs
Source:
CodeAction.cs

Creates a CodeAction representing a group of code actions.

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

Parameters

title
String

Title of the CodeAction group.

nestedActions
ImmutableArray<CodeAction>

The code actions within the group.

isInlinable
Boolean

true to allow inlining the members of the group into the parent; otherwise, false to require that this group appear as a group with nested actions.

priority
CodeActionPriority

Priority of the code action

Returns

Applies to

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

Parameters

title
String
equivalenceKey
String
priority
CodeActionPriority

Code action priority

Returns

Applies to

Create(String, Func<IProgress<CodeAnalysisProgress>,CancellationToken,Task<Solution>>, String, CodeActionPriority)

Source:
CodeAction.cs
Source:
CodeAction.cs

Creates a CodeAction for a change to more than one Document within a Solution. Use this factory when the change is expensive to compute and should be deferred until requested.

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

Parameters

title
String

Title of the CodeAction.

createChangedSolution
Func<IProgress<CodeAnalysisProgress>,CancellationToken,Task<Solution>>

Function to create the Solution.

equivalenceKey
String

Optional value used to determine the equivalence of the CodeAction with other CodeActions. See EquivalenceKey.

Returns

Applies to

Create(String, Func<CancellationToken,Task<Document>>, String, CodeActionPriority)

Source:
CodeAction.cs
Source:
CodeAction.cs
Source:
CodeAction.cs

Creates a CodeAction for a change to a single Document. Use this factory when the change is expensive to compute and should be deferred until requested.

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

Parameters

title
String

Title of the CodeAction.

createChangedDocument
Func<CancellationToken,Task<Document>>

Function to create the Document.

equivalenceKey
String

Optional value used to determine the equivalence of the CodeAction with other CodeActions. See EquivalenceKey.

priority
CodeActionPriority

Code action priority

Returns

Applies to

Create(String, Func<CancellationToken,Task<Solution>>, String, CodeActionPriority)

Source:
CodeAction.cs
Source:
CodeAction.cs
Source:
CodeAction.cs

Creates a CodeAction for a change to more than one Document within a Solution. Use this factory when the change is expensive to compute and should be deferred until requested.

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

Parameters

title
String

Title of the CodeAction.

createChangedSolution
Func<CancellationToken,Task<Solution>>

Function to create the Solution.

equivalenceKey
String

Optional value used to determine the equivalence of the CodeAction with other CodeActions. See EquivalenceKey.

Returns

Applies to