public static Task GetTask(FutureVoid fu) { TaskCompletionSource <int> tcs = new TaskCompletionSource <int>(); if (fu.status() == FutureStatus.Invalid) { tcs.SetException(new FirebaseException(0, "Asynchronous operation was not started.")); return(tcs.Task); } fu.SetOnCompletionCallback(delegate { if (fu.status() == FutureStatus.Invalid) { tcs.SetCanceled(); } else { int num = fu.error(); if (num != 0) { tcs.SetException(new FirebaseException(num, fu.error_message())); } else { tcs.SetResult(0); } } fu.Dispose(); }); return(tcs.Task); }
internal static HandleRef getCPtr(FutureVoid obj) { return((obj != null) ? obj.swigCPtr : new HandleRef(null, IntPtr.Zero)); }
public static Task FixAndroidDependenciesAsync() { return(FutureVoid.GetTask(new FutureVoid(AppUtilPINVOKE.FixAndroidDependencies(), true))); }