public adduohelper.envelopes.ResponseEnvelope <dto.Token> Response(proto.TokenResponse response) { var envelope = new adduohelper.envelopes.ResponseEnvelope <dto.Token>(); envelope.HttpStatusCode = (HttpStatusCode)response.HttpStatusCode; return(envelope); }
public adduohelper.envelopes.ResponseEnvelope <dto.Token> Response(proto.TokenResponse response) { var envelope = new adduohelper.envelopes.ResponseEnvelope <dto.Token> { HttpStatusCode = (HttpStatusCode)response.HttpStatusCode }; if (envelope.Success) { envelope.Item = new dto.Token() { Valor = response.Valor }; } return(envelope); }