Table of Contents

Class WorkspaceEditFilesResult

Namespace
RDCore.SDK.Client
Assembly
RDCore.SDK.dll

What applying a workspace edit to files did (ApplyAsync(WorkspaceEdit, Func<DocumentUri, int?>, CancellationToken)): the answer to workspace/applyEdit (LSP 3.17 §ApplyWorkspaceEditResult), and the files that were written.

public sealed record WorkspaceEditFilesResult : IEquatable<WorkspaceEditFilesResult>
Inheritance
WorkspaceEditFilesResult
Implements
Inherited Members

Constructors

WorkspaceEditFilesResult(bool, string?, int?, IReadOnlyList<string>)

What applying a workspace edit to files did (ApplyAsync(WorkspaceEdit, Func<DocumentUri, int?>, CancellationToken)): the answer to workspace/applyEdit (LSP 3.17 §ApplyWorkspaceEditResult), and the files that were written.

public WorkspaceEditFilesResult(bool Applied, string? FailureReason, int? FailedChange, IReadOnlyList<string> Written)

Parameters

Applied bool

true when every change was written.

FailureReason string

Why the edit was not applied, in the language of the user interface; null when it was.

FailedChange int?

The index of the change that was not applied, among the edit's document changes (or its changes); null when it was.

Written IReadOnlyList<string>

The paths of the files written, in the order they were written: every file the edit changes, or those written before a write failed.

Properties

Applied

true when every change was written.

public bool Applied { get; init; }

Property Value

bool

FailedChange

The index of the change that was not applied, among the edit's document changes (or its changes); null when it was.

public int? FailedChange { get; init; }

Property Value

int?

FailureReason

Why the edit was not applied, in the language of the user interface; null when it was.

public string? FailureReason { get; init; }

Property Value

string

Written

The paths of the files written, in the order they were written: every file the edit changes, or those written before a write failed.

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

Property Value

IReadOnlyList<string>

Methods

ToResponse()

The answer to workspace/applyEdit.

public ApplyWorkspaceEditResponse ToResponse()

Returns

ApplyWorkspaceEditResponse

The response, with the reason and the change that failed, if any.