コード例 #1
0
        public async Task <Endereco> GetEnderecoAsync(CEP cep)
        {
            var json = await GetViaCEPClient().GetEnderecoAsync(cep, OutputType.Json);

            return(TryConvertToEndereco(
                       JsonConvert.DeserializeObject <Endereco>(json) as Endereco));
        }
コード例 #2
0
        public Endereco GetEndereco(CEP cep)
        {
            var json = GetViaCEPClient().GetEndereco(cep, OutputType.Json);

            return(TryConvertToEndereco(
                       JsonConvert.DeserializeObject <Endereco>(json) as Endereco));
        }
コード例 #3
0
        public Endereco GetEndereco(CEP cep)
        {
            var json     = GetViaCEPClient().GetEndereco(cep, OutputType.Json);
            var endereco = JsonConvert.DeserializeObject <Endereco>(json) as Endereco;

            return(TryConvertToEndereco(endereco.CEP, endereco.Logradouro, endereco.Complemento
                                        , endereco.Bairro, endereco.Localidade, endereco.UF
                                        , endereco.Unidade, endereco.IBGE, endereco.GIA));
        }
コード例 #4
0
 public string GetEnderecoQuerty(CEP cep)
 {
     return(GetViaCEPClient().GetEndereco(cep, OutputType.Querty));
 }
コード例 #5
0
 public async Task <string> GetEnderecoQuertyAsync(CEP cep)
 {
     return(await GetViaCEPClient().GetEnderecoAsync(cep, OutputType.Querty));
 }
コード例 #6
0
 public string GetEnderecoPiped(CEP cep)
 {
     return(GetViaCEPClient().GetEndereco(cep, OutputType.Piped));
 }
コード例 #7
0
 public async Task <string> GetEnderecoPipedAsync(CEP cep)
 {
     return(await GetViaCEPClient().GetEnderecoAsync(cep, OutputType.Piped));
 }
コード例 #8
0
 public string GetEnderecoJson(CEP cep)
 {
     return(GetViaCEPClient().GetEndereco(cep, OutputType.Json));
 }
コード例 #9
0
 public string GetEnderecoXml(CEP cep)
 {
     return(GetViaCEPClient().GetEndereco(cep, OutputType.Xml));
 }