Skip to content

Commit afeb79e

Browse files
committed
Explicit access modifiers, clean up typing
1 parent 9fd4ee9 commit afeb79e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/ExtractToCodeBehindCodeActionProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
namespace Microsoft.AspNetCore.Razor.LanguageServer.Refactoring
1717
{
18-
class ExtractToCodeBehindCodeActionProvider : RazorCodeActionProvider
18+
internal class ExtractToCodeBehindCodeActionProvider : RazorCodeActionProvider
1919
{
2020
override public Task<CommandOrCodeActionContainer> ProvideAsync(RazorCodeActionContext context, CancellationToken cancellationToken)
2121
{
@@ -29,7 +29,7 @@ override public Task<CommandOrCodeActionContainer> ProvideAsync(RazorCodeActionC
2929
return Task.FromResult<CommandOrCodeActionContainer>(null);
3030
}
3131

32-
var change = new SourceChange(context.Location.AbsoluteIndex, length: 0, newText: "");
32+
var change = new SourceChange(context.Location.AbsoluteIndex, length: 0, newText: string.Empty);
3333
var node = context.Document.GetSyntaxTree().Root.LocateOwner(change);
3434
if (node is null)
3535
{

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Refactoring/ExtractToCodeBehindCodeActionResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace Microsoft.AspNetCore.Razor.LanguageServer.Refactoring
2121
{
22-
class ExtractToCodeBehindCodeActionResolver : RazorCodeActionResolver
22+
internal class ExtractToCodeBehindCodeActionResolver : RazorCodeActionResolver
2323
{
2424
private readonly ForegroundDispatcher _foregroundDispatcher;
2525
private readonly DocumentResolver _documentResolver;
@@ -44,7 +44,7 @@ public ExtractToCodeBehindCodeActionResolver(
4444
_documentResolver = documentResolver;
4545
}
4646

47-
override public async Task<WorkspaceEdit> ResolveAsync(JObject data, CancellationToken cancellationToken)
47+
public override async Task<WorkspaceEdit> ResolveAsync(JObject data, CancellationToken cancellationToken)
4848
{
4949
var actionParams = data.ToObject<ExtractToCodeBehindParams>();
5050
var path = Path.GetFullPath(actionParams.Uri.LocalPath);

src/Razor/src/Microsoft.AspNetCore.Razor.VSCode/src/CodeActions/RazorCodeActionRunner.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ export class RazorCodeActionRunner {
2020
vscode.commands.registerCommand('razor/runCodeAction', (request: object) => this.runCodeAction(request), this);
2121
}
2222

23-
private async runCodeAction(request: any): Promise<boolean | string | {}> {
23+
private async runCodeAction(request: any): Promise<boolean> {
2424
const response: CodeActionResolutionResponse = await this.serverClient.sendRequest('razor/resolveCodeAction', {Action: request.Action, Data: request.Data});
25-
this.logger.logVerbose(`received from razor/resolveCodeAction: ${JSON.stringify(response)}`);
2625
let workspaceEdit: vscode.WorkspaceEdit;
2726
try {
2827
workspaceEdit = convertWorkspaceEditFromSerializable(response.edit);

0 commit comments

Comments
 (0)