byte[] IAuthenticationWebServiceContract.CompleteAccount(byte[] data)
        {
            try
            {
                using (var bytes = new MemoryStream(data))
                {
                    var cmid        = Int32Proxy.Deserialize(bytes);
                    var name        = StringProxy.Deserialize(bytes);
                    var channelType = EnumProxy <ChannelType> .Deserialize(bytes);

                    var locale    = StringProxy.Deserialize(bytes);
                    var machineId = StringProxy.Deserialize(bytes);

                    var view = OnCompleteAccount(cmid, name, channelType, locale, machineId);
                    using (var outBytes = new MemoryStream())
                    {
                        AccountCompletionResultViewProxy.Serialize(outBytes, view);
                        return(outBytes.ToArray());
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Error("Unable to handle CompleteAccount request:");
                Log.Error(ex);
                return(null);
            }
        }
예제 #2
0
        public AccountCompletionResultView CompleteAccount(int cmid, string name, ChannelType channelType, string locale, string machineId)
        {
            using (var bytes = new MemoryStream())
            {
                Int32Proxy.Serialize(bytes, cmid);
                StringProxy.Serialize(bytes, name);
                EnumProxy <ChannelType> .Serialize(bytes, channelType);

                StringProxy.Serialize(bytes, locale);
                StringProxy.Serialize(bytes, machineId);

                var data = Channel.CompleteAccount(bytes.ToArray());
                using (var inBytes = new MemoryStream(data))
                    return(AccountCompletionResultViewProxy.Deserialize(inBytes));
            }
        }
예제 #3
0
        // Token: 0x06001145 RID: 4421 RVA: 0x0001BC90 File Offset: 0x00019E90
        public static Coroutine CompleteAccount(int cmid, string name, ChannelType channel, string locale, string machineId, Action <AccountCompletionResultView> callback, Action <Exception> handler)
        {
            Coroutine result;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, cmid);
                StringProxy.Serialize(memoryStream, name);
                EnumProxy <ChannelType> .Serialize(memoryStream, channel);

                StringProxy.Serialize(memoryStream, locale);
                StringProxy.Serialize(memoryStream, machineId);
                result = MonoInstance.Mono.StartCoroutine(SoapClient.MakeRequest("IAuthenticationWebServiceContract", "AuthenticationWebService", "CompleteAccount", memoryStream.ToArray(), delegate(byte[] data)
                {
                    if (callback != null)
                    {
                        callback(AccountCompletionResultViewProxy.Deserialize(new MemoryStream(data)));
                    }
                }, handler));
            }
            return(result);
        }