Beispiel #1
0
        public proto.UsuarioAtualizacaoResponse Response(adduohelper.ResponseEnvelope <dto.entries.UsuarioAtualizacao> envelope)
        {
            var response = new proto.UsuarioAtualizacaoResponse
            {
                HttpStatusCode = (int)envelope.HttpStatusCode,
                Usuario        = new proto.UsuarioAtualizacaoRequest
                {
                    Nome = new proto.EntryString
                    {
                        Value  = envelope.Item.Nome.Value,
                        Code   = (int)envelope.Item.Nome.Code,
                        Status = (int)envelope.Item.Nome.Status
                    },
                    Apelido = new proto.EntryString
                    {
                        Value  = envelope.Item.Apelido.Value,
                        Code   = (int)envelope.Item.Apelido.Code,
                        Status = (int)envelope.Item.Apelido.Status
                    },
                    Email = new proto.EntryString
                    {
                        Value  = envelope.Item.Email.Value,
                        Code   = (int)envelope.Item.Email.Code,
                        Status = (int)envelope.Item.Email.Status
                    }
                }
            };

            return(response);
        }
Beispiel #2
0
        public adduohelper.envelopes.ResponseEnvelope <dto.entries.UsuarioAtualizacao> Response(proto.UsuarioAtualizacaoResponse usuarioResponse)
        {
            var response = new adduohelper.envelopes.ResponseEnvelope <dto.entries.UsuarioAtualizacao>
            {
                HttpStatusCode = (HttpStatusCode)usuarioResponse.HttpStatusCode,
                Item           = new dto.entries.UsuarioAtualizacao
                {
                    Nome = new adduohelper.entries.Name
                    {
                        Code   = (adduohelper.entries.CODE)usuarioResponse.Usuario.Nome.Code,
                        Status = (adduohelper.entries.STATUS)usuarioResponse.Usuario.Nome.Status,
                        Value  = usuarioResponse.Usuario.Nome.Value
                    },
                    Apelido = new adduohelper.entries.String32
                    {
                        Code   = (adduohelper.entries.CODE)usuarioResponse.Usuario.Apelido.Code,
                        Status = (adduohelper.entries.STATUS)usuarioResponse.Usuario.Apelido.Status,
                        Value  = usuarioResponse.Usuario.Apelido.Value
                    },
                    Email = new adduohelper.entries.Email
                    {
                        Code   = (adduohelper.entries.CODE)usuarioResponse.Usuario.Email.Code,
                        Status = (adduohelper.entries.STATUS)usuarioResponse.Usuario.Email.Status,
                        Value  = usuarioResponse.Usuario.Email.Value
                    }
                }
            };

            return(response);
        }