using System.Threading.Tasks; using System.Collections.Generic; using LeanCloud.Storage.Internal.Codec; namespace LeanCloud.Storage { /// /// 云引擎 /// public static class LCCloud { /// /// 调用云函数,结果为 Dictionary 类型 /// /// /// /// public static async Task> Run(string name, Dictionary parameters = null) { string path = $"functions/{name}"; Dictionary response = await LeanCloud.HttpClient.Post>(path, data: parameters); return response; } public static async Task RPC(string name, Dictionary parameters = null) { string path = $"call/{name}"; Dictionary response = await LeanCloud.HttpClient.Post>(path, data: parameters); return LCDecoder.Decode(response["result"]); } } }