File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
Microsoft.AspNetCore.Razor.LanguageServer/Refactoring
Microsoft.AspNetCore.Razor.VSCode/src/CodeActions Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1515
1616namespace 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 {
Original file line number Diff line number Diff line change 1919
2020namespace 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 ) ;
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments