Ejemplo n.º 1
0
 public Client[] LoadAllClients(TenroxIdentity identity)
 {
     if (identity == null) throw new ArgumentNullException("identity");
     return _cache.TryGetSet("Clients", () =>
     {
         BasicHttpBinding basicHttpBinding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
         basicHttpBinding.MaxReceivedMessageSize = int.MaxValue;
         using (
             ClientsClient client = new ClientsClient(basicHttpBinding,
                 new EndpointAddress(_webServiceEndpoint))
             )
         {
             return client.QueryByAll(identity.UserToken);
         }
     });
 }