public void UnregisterDeviceAsync(TLInt tokenType, TLString token, Action <TLBool> callback, Action <TLRPCError> faultCallback = null)
        {
            var obj = new TLUnregisterDevice
            {
                //TokenType = new TLInt(3),   // MPNS
                //TokenType = new TLInt(8),   // WNS
                TokenType = tokenType,
                Token     = token
            };

            const string methodName = "account.unregisterDevice";

            Logs.Log.Write(string.Format("{0} {1}", methodName, obj));
            SendInformativeMessage <TLBool>("account.unregisterDevice", obj,
                                            result =>
            {
                Logs.Log.Write(string.Format("{0} result={1}", methodName, result));

                callback.SafeInvoke(result);
            },
                                            error =>
            {
                Logs.Log.Write(string.Format("{0} error={1}", methodName, error));

                faultCallback.SafeInvoke(error);
            });
        }
Exemple #2
0
        public void UnregisterDeviceAsync(TLString token, Action <TLBool> callback, Action <TLRPCError> faultCallback = null)
        {
            var obj = new TLUnregisterDevice
            {
                TokenType = new TLInt(3),
                Token     = token
            };

            SendInformativeMessage("account.unregisterDevice", obj, callback, faultCallback);
        }