mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
Refactoring [WIP]
This commit is contained in:
@@ -5,16 +5,16 @@ namespace Wox.RPC
|
||||
{
|
||||
public class JsonRPC
|
||||
{
|
||||
public static string GetRPC(string method, List<string> paras)
|
||||
public static string Send(string method, List<string> paras)
|
||||
{
|
||||
var list = paras.Select(s => string.Format(@"\""{0}\""", s));
|
||||
return string.Format(@"{{\""jsonrpc\"": \""2.0\"",\""method\"": \""{0}\"", \""params\"": [{1}], \""id\"": 1}}",
|
||||
method, string.Join(",", list.ToArray()));
|
||||
}
|
||||
|
||||
public static string GetRPC(string method, string para)
|
||||
public static string Send(string method, string para)
|
||||
{
|
||||
return GetRPC(method, new List<string>() { para });
|
||||
return Send(method, new List<string>() { para });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user