-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8207 from davidwengier/SendVSInternalTypesToWebTools
- Loading branch information
Showing
14 changed files
with
210 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...zor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/VSCodeActionParams.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT license. See License.txt in the project root for license information. | ||
|
||
using System.Runtime.Serialization; | ||
using Microsoft.VisualStudio.LanguageServer.Protocol; | ||
|
||
namespace Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts; | ||
|
||
/// <summary> | ||
/// We can't use the CodeActionParams defined in MS.VS.LS.Protocol, so need our own version, because the platform only | ||
/// converts on read, not write. ie, if it gets a request for a CodeActionParams, it will happily deserialize the Context | ||
/// property to VSInternalCodeActionContext, but in our case we need to send a request to our CustomMessageTarget, and so | ||
/// we need the Context property serialized as the internal type. | ||
/// </summary> | ||
[DataContract] | ||
internal class VSCodeActionParams | ||
{ | ||
// | ||
// Summary: | ||
// Gets or sets the document identifier indicating where the command was invoked. | ||
[DataMember(Name = "textDocument")] | ||
public required VSTextDocumentIdentifier TextDocument { get; set; } | ||
|
||
// | ||
// Summary: | ||
// Gets or sets the range in the document for which the command was invoked. | ||
[DataMember(Name = "range")] | ||
public required Range Range { get; set; } | ||
|
||
// | ||
// Summary: | ||
// Gets or sets the additional diagnostic information about the code action context. | ||
[DataMember(Name = "context")] | ||
public required VSInternalCodeActionContext Context { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.