예제 #1
0
        public void SendCodeAsync(string phoneNumber, bool?currentNumber, Action <TLAuthSentCode> callback, Action <int> attemptFailed = null, Action <TLRPCError> faultCallback = null)
        {
            var obj = new TLAuthSendCode
            {
                Flags         = 0,
                PhoneNumber   = phoneNumber,
                CurrentNumber = currentNumber,
                ApiId         = Constants.ApiId,
                ApiHash       = Constants.ApiHash
            };

            SendInformativeMessage("auth.sendCode", obj, callback, faultCallback, 3);
        }
예제 #2
0
        public void SendCodeAsync(string phoneNumber, bool?currentNumber, Action <TLAuthSentCode> callback, Action <int> attemptFailed = null, Action <TLRPCError> faultCallback = null)
        {
            var obj = new TLAuthSendCode
            {
                Flags         = 0,
                PhoneNumber   = phoneNumber,
                CurrentNumber = currentNumber,
                ApiId         = Constants.ApiId,
                ApiHash       = Constants.ApiHash
            };

            const string caption = "auth.sendCode";

            SendInformativeMessage(caption, obj, callback, faultCallback, flags: RequestFlag.FailOnServerError | RequestFlag.WithoutLogin | RequestFlag.TryDifferentDc | RequestFlag.EnableUnauthorized);
        }