-
创建时间
20年9月10日
-
最后回复
20年9月10日
- 2
回复
- 45
浏览
- 2
用户
- 2
链接
我也更新了一下 云引擎 SDK
但是旧版 SDK 不支持返回值为 Task 类型,所以代码要使用同步方式,需做如下改动
[EngineFunction("Hello")]
public static string Hello([EngineFunctionParameter("text")]string text)
{
Console.WriteLine("call Hello function");
try {
AVQuery<AVObject> query = new AVQuery<AVObject>("Hello");
Task<IEnumerable<AVObject>> task = query.FindAsync();
task.Wait();
foreach (AVObject obj in task.Result) {
Console.WriteLine(obj.ObjectId);
}
} catch (Exception e) {
Console.WriteLine(e.Message);
}
return $"hello, {text}";
}
