Class CodeAction
Represents a code action that encapsulates an operation or transformation to be performed on code.
public class CodeAction
- Inheritance
-
CodeAction
- Inherited Members
- Extension Methods
Properties
Action
public ActionsEnum.ResourceAction Action { get; set; }
Property Value
Code
public required Code Code { get; set; }
Property Value
Methods
Apply(List<CodeAction>)
Applies a list of CodeAction items and returns the resulting Code list, using the default (null) context by delegating to the contextual overload.
public static List<Code>? Apply(List<CodeAction> actions)
Parameters
actionsList<CodeAction>The list of code actions to apply.
Returns
Apply(List<Code>?, List<CodeAction>?)
Applies a list of code actions to the source list, handling addition, deletion, and update operations while avoiding duplicates. Returns null if the resulting source list is empty.
public static List<Code>? Apply(List<Code>? source, List<CodeAction>? actions)
Parameters
sourceList<Code>The list of codes to modify. If null, an empty list is used as the starting point.
actionsList<CodeAction>The list of code actions to apply. If null, the source list is returned unchanged.