-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 替换 Assemblies 属性为 Packages 属性
在多个文件中进行了以下重构: - `CodeCheckRequest.cs`、`HoverInfoRequest.cs`、`SignatureHelpRequest.cs`、`TabCompletionRequest.cs` 中移除了构造函数和 `Assemblies` 属性,添加了 `Packages` 属性,并将 `Assemblies` 属性替换为 `Packages` 属性。 - `CodeRunner.cs` 中移除了下载 NuGet 包的注释,添加了加载 NuGet 包的代码。 - `CompletitionRequestHandler.cs` 中添加了 `monacoEditorCSharp.DataHelpers` 的引用,并在处理请求的方法中添加了加载 NuGet 包的代码。 - `DownloadNugetPackages.cs` 中修改了加载 NuGet 包的逻辑,添加了对 `netstandard2.1` 的支持,并添加了 `DownloadAllPackages` 方法。 - `Program.cs` 中修改了处理请求的逻辑,添加了对 `Packages` 属性的处理,并将其转换为字符串传递给处理方法。 - `csharpLanguageProvider.js` 中修改了请求的构造逻辑,添加了对 `Packages` 属性的处理,并将其包含在请求中。
- Loading branch information
1 parent
2e8b04a
commit 465d601
Showing
9 changed files
with
78 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
namespace MonacoRoslynCompletionProvider.Api | ||
using System.Collections.Generic; | ||
|
||
namespace MonacoRoslynCompletionProvider.Api | ||
{ | ||
public class CodeCheckRequest : IRequest | ||
{ | ||
public CodeCheckRequest() | ||
{ } | ||
|
||
public CodeCheckRequest(string code, string[] assemblies) | ||
{ | ||
this.Code = code; | ||
this.Assemblies = assemblies; | ||
} | ||
|
||
public virtual string Code { get; set; } | ||
|
||
public virtual string[] Assemblies { get; set; } | ||
public List<Package> Packages { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
namespace MonacoRoslynCompletionProvider.Api | ||
using System.Collections.Generic; | ||
|
||
namespace MonacoRoslynCompletionProvider.Api | ||
{ | ||
public class HoverInfoRequest : IRequest | ||
{ | ||
public HoverInfoRequest() | ||
{ } | ||
|
||
public HoverInfoRequest(string code, int position, string[] assemblies) | ||
{ | ||
this.Code = code; | ||
this.Position = position; | ||
this.Assemblies = assemblies; | ||
} | ||
|
||
public virtual string Code { get; set; } | ||
|
||
public virtual int Position { get; set; } | ||
|
||
public virtual string[] Assemblies { get; set; } | ||
|
||
public List<Package> Packages { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
namespace MonacoRoslynCompletionProvider.Api | ||
using System.Collections.Generic; | ||
|
||
namespace MonacoRoslynCompletionProvider.Api | ||
{ | ||
public class SignatureHelpRequest : IRequest | ||
{ | ||
public SignatureHelpRequest() | ||
{ } | ||
|
||
public SignatureHelpRequest(string code, int position, string[] assemblies) | ||
{ | ||
this.Code = code; | ||
this.Position = position; | ||
this.Assemblies = assemblies; | ||
} | ||
|
||
public virtual string Code { get; set; } | ||
|
||
public virtual int Position { get; set; } | ||
|
||
public virtual string[] Assemblies { get; set; } | ||
public List<Package> Packages { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
namespace MonacoRoslynCompletionProvider.Api | ||
using System.Collections.Generic; | ||
|
||
namespace MonacoRoslynCompletionProvider.Api | ||
{ | ||
public class TabCompletionRequest : IRequest | ||
{ | ||
public TabCompletionRequest() | ||
{ } | ||
|
||
public TabCompletionRequest(string code, int position, string[] assemblies) | ||
{ | ||
this.Code = code; | ||
this.Position = position; | ||
this.Assemblies = assemblies; | ||
} | ||
|
||
public virtual string Code { get; set; } | ||
|
||
public virtual int Position { get; set; } | ||
|
||
public virtual string[] Assemblies { get; set; } | ||
|
||
public List<Package> Packages { 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
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