mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 05:06:36 +02:00
Add portable python environment
This commit is contained in:
21
Wox/RPC/2obywmlm.f50
Normal file
21
Wox/RPC/2obywmlm.f50
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Wox.RPC
|
||||
{
|
||||
public class JsonRPC
|
||||
{
|
||||
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 Send(string method, string para)
|
||||
{
|
||||
return string.Format(@"{{\""jsonrpc\"": \""2.0\"",\""method\"": \""{0}\"", \""params\"": {1}, \""id\"": 1}}",
|
||||
method, string.Join(",", list.ToArray()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user