Class WorkspaceEditFilesResult
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
Appliedbooltrue when every change was written.
FailureReasonstringWhy the edit was not applied, in the language of the user interface; null when it was.
FailedChangeint?The index of the change that was not applied, among the edit's document changes (or its changes); null when it was.
WrittenIReadOnlyList<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
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
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
Methods
ToResponse()
The answer to workspace/applyEdit.
public ApplyWorkspaceEditResponse ToResponse()
Returns
- ApplyWorkspaceEditResponse
The response, with the reason and the change that failed, if any.