C# Hello World Cloud函数,带有Parse和Xamarin.NET

C# Hello World Cloud函数,带有Parse和Xamarin.NET,c#,xamarin,parse-platform,C#,Xamarin,Parse Platform,我试图按照Parse.com上的教程从.NETAPI调用CloudFunctions 显然,这应该是可行的: var result = await ParseCloud.CallFunctionAsync<IDictionary<string, object>>("hello", new Dictionary<string, object>());` var result=wait ParseCloud.callfunctionsync(“hello”,ne

我试图按照Parse.com上的教程从.NETAPI调用CloudFunctions

显然,这应该是可行的:

var result = await ParseCloud.CallFunctionAsync<IDictionary<string, object>>("hello", new Dictionary<string, object>());`
var result=wait ParseCloud.callfunctionsync(“hello”,new Dictionary())`
调用Xamarin时:

button.Click += async (sender, e) => {
    var result = await ParseCloud.CallFunctionAsync<IDictionary<string, object>> ("hello", new Dictionary<string, object>());
};
button.Click+=async(发送方,e)=>{
var result=await ParseCloud.callfunctionsync(“hello”,new Dictionary());
};
它只是锁定了我的移动应用程序。打电话时:

button.Click += async (sender, e) => {
    var obj = new ParseObject("Note");
    obj ["text"] = "Hello, world!  This is a Xamarin app using Parse!";
    obj ["tags"] = new List<string> {"welcome", "xamarin", "parse"};
    await obj.SaveAsync ();
};
button.Click+=async(发送方,e)=>{
var obj=新的解析对象(“注释”);
obj[“text”]=“你好,世界!这是一个使用Parse的Xamarin应用程序!”;
obj[“tags”]=新列表{“welcome”、“xamarin”、“parse”};
等待obj.SaveAsync();
};
它成功地保存了一个要分析的对象

当使用curl调用“hello”云函数时,它工作正常并返回“helloworld”

我不明白我做错了什么。有什么建议吗?

var result=wait ParseCloud.callfunctionsync(“hello”,new Dictionary());
var result = await ParseCloud.CallFunctionAsync<string>("hello", new Dictionary<string, object>());
                Toast.MakeText(this,result.ToString(),ToastLength.Short).Show();
Toast.MakeText(this,result.ToString(),ToastLength.Short).Show();
这是因为他们网站上的例子是错误的!它应该是
callfunctionsync
,而不是
callfunctionsync
,因为返回的类型是字符串

啊,啊。希望这对将来的人有所帮助


EDIT:根据Parse的开发人员的说法,现在/很快就会解决这个问题。

如果你的云函数返回一个对象,那么
IDictionary
版本是正确的,如果你的云函数只返回一个字符串,那么就使用
string
。是的,谢谢Timothy,最终解决了这个问题。我在Parse网站上看到了这个例子,但现在我知道了。干杯