Exemplo n.º 1
0
        private async Task <List <string> > InitModelsInForm()
        {
            try
            {
                string request = tcpService.SerializeInitModelsInAddAdmissionForm(SingletoneObj.User);
                byte[] data    = await tcpService.CodeStreamAsync(request);

                await SingletoneObj.Stream.WriteAsync(data, 0, data.Length);

                string response = await tcpService.DecodeStreamAsync(SingletoneObj.Stream);

                List <string> models = tcpService.DeseializeInitModelsInAddAdmissionForm(response);
                return(models);
            }
            catch (Exception)
            {
                return(new List <string>());
            }
        }