private C8oPromiseFailSync <T> Progress(C8oOnProgress c8oOnProgress, bool ui) { if (nextPromise != null) { return(nextPromise.Progress(c8oOnProgress, ui)); } else { c8oProgress = new KeyValuePair <C8oOnProgress, bool>(c8oOnProgress, ui); nextPromise = new C8oPromise <T>(c8o); return(nextPromise); } }
/// <summary> /// Will be executed in a UI thread when synchronizing data. This gives the opportunity to handle a FullSync /// progression. The lambda function will receive a C8oOnProgress object describing the replication status. /// </summary> /// <param name="C8oOnProgress">A C8oOnProgress lambda function</param> /// <returns>C8oPromiseFailSync object to chain for other calls</returns> public C8oPromiseFailSync <T> ProgressUI(C8oOnProgress c8oOnProgress) { return(Progress(c8oOnProgress, true)); }
/// <summary> /// Will be executed in a worker thread when synchronizing data. This gives the opportunity to handle a FullSync /// progression. The lambda function will receive a C8oOnProgress object describing the replication status. /// </summary> /// <param name="C8oOnProgress">A C8oOnProgress lambda function</param> /// <returns>C8oPromiseFailSync object to chain for other calls</returns> public C8oPromiseFailSync <T> Progress(C8oOnProgress c8oOnProgress) { return(Progress(c8oOnProgress, false)); }