Table of Contents

Class RefactorApplyParams

Namespace
RDCore.SDK.Platform.Protocol
Assembly
RDCore.SDK.Protocol.dll

Applies a refactoring of a document's range with its user's answers (rdcore/refactor/apply), and is answered the edit it makes (RefactorWorkspaceEdit). A refactoring that is refused, or whose answers it refuses, is answered with an error (RequestFailed, -32803) whose message says why, in the language of the user interface.

public record RefactorApplyParams : IEquatable<RefactorApplyParams>
Inheritance
RefactorApplyParams
Implements
Derived
Inherited Members

Remarks

The edit is not applied by the language server: the client applies it, as it applies the edit of a code action.

Properties

Accepted

The codes of the changes the user accepts (Code); a refactoring that would make a change that is not accepted is refused.

public IReadOnlyList<string> Accepted { get; init; }

Property Value

IReadOnlyList<string>

Answers

The user's answers, by the choice each is to; a choice that is not answered takes its default.

public IReadOnlyList<RefactorAnswer> Answers { get; init; }

Property Value

IReadOnlyList<RefactorAnswer>

Kind

Which refactoring: the kind of its code action (LSP 3.17 §Code Action Request), as the language server offers it.

public string Kind { get; init; }

Property Value

string

Range

The range of the document the refactoring is of: the selection, or the position of a name.

public SourceRange Range { get; init; }

Property Value

SourceRange

Uri

The address of the document.

public Uri? Uri { get; init; }

Property Value

Uri