public static async Task <CustomerEstado> LoadClientesAll() { CustomerEstado Respuesta = CustomerEstado.ErrorSistema; await Task.Run(() => { TS_SISalesClient cliente = null; try { cliente = new TS_SISalesClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Sales)); _ListarClientesCompleted(cliente.ListarClientes()); Respuesta = CustomerEstado.EsperandoRespuesta; } catch { Respuesta = CustomerEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respuesta); }