public void GetStateWithoutUpdatesAsync(Action <TLState> callback, Action <TLRPCError> faultCallback = null) { var obj = new TLInvokeWithoutUpdates { Object = new TLGetState() }; SendInformativeMessage("updates.getState", obj, callback, faultCallback); }
public void GetStateWithoutUpdatesAsync(Action <TLUpdatesState> callback, Action <TLRPCError> faultCallback = null) { var obj = new TLInvokeWithoutUpdates { Query = new TLUpdatesGetState() }; const string caption = "updates.getState"; SendInformativeMessage(caption, obj, callback, faultCallback); }
public void UpdateStatusAsync(TLBool offline, Action <TLBool> callback, Action <TLRPCError> faultCallback = null) { if (_activeTransport.AuthKey == null) { return; } #if WIN_RT if (_deviceInfo != null && _deviceInfo.IsBackground) { var message = string.Format("::{0} {1} account.updateStatus {2}", _deviceInfo.BackgroundTaskName, _deviceInfo.BackgroundTaskId, offline); Logs.Log.Write(message); #if DEBUG && WNS_PUSH_SERVICE AddToast("task", message); #endif } #endif TLObject obj = null; if (_deviceInfo != null && _deviceInfo.IsBackground) { obj = new TLInvokeWithoutUpdates { Object = new TLUpdateStatus { Offline = offline } }; } else { obj = new TLUpdateStatus { Offline = offline }; } System.Diagnostics.Debug.WriteLine("account.updateStatus offline=" + offline.Value); SendInformativeMessage("account.updateStatus", obj, callback, faultCallback); }