mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-24 04:53:31 +08:00
新增 quickcommand.runCsharp
This commit is contained in:
23
src/plugins/monaco/types/quickcommand.api.d.ts
vendored
23
src/plugins/monaco/types/quickcommand.api.d.ts
vendored
@@ -342,6 +342,29 @@ interface quickcommandApi {
|
||||
*/
|
||||
runPowerShell(script: string): Promise<string>;
|
||||
|
||||
/**
|
||||
* 运行C#脚本,并返回运行结果 (Promise)
|
||||
*
|
||||
* 需要安装.NET Framework
|
||||
*
|
||||
* ```js
|
||||
* const script = `using System;
|
||||
* class Program {
|
||||
* static void Main(string[] args) {
|
||||
* Console.WriteLine("Hello, World!");
|
||||
* }
|
||||
* }`
|
||||
* quickcommand.runCsharp(script).then(res => {
|
||||
* console.log(res)
|
||||
* }).catch(err => {
|
||||
* console.log(err)
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* @param script C# 脚本代码
|
||||
*/
|
||||
runCsharp(script: string): Promise<string>;
|
||||
|
||||
/**
|
||||
* MacOS 下运行 AppleScript 脚本并返回运行结果 (Promise)
|
||||
*
|
||||
|
Reference in New Issue
Block a user