Firebase GetValueAsync与CancellationToken C#(Unity)

时间:2017-06-19 09:55:01

标签: c# firebase unity3d firebase-realtime-database

只要我将“取消令牌”添加到“续订”中即可。回调任务失去了它的协议,因而.Result会产生编译错误。这是firebase的错误吗?

reference.Child(string.Format("friendsLeaderboard/{0}/{1}", auth.CurrentUser.UserId, seed))
        .OrderByChild("time")
        .LimitToFirst(10).GetValueAsync().ContinueWith(task => {
            if (task.IsFaulted) {

            } else if (task.IsCompleted) {
                var snapshot = task.Result;

            }
        }, token);

1 个答案:

答案 0 :(得分:-1)

尝试使用:

string TheSearchString = "John";
ContactFirst.IndexOf(TheSearchString, StringComparison.CurrentCultureIgnoreCase);