Esempio n. 1
0
 public static ClientContainer GetGlobalContainerFor(Uri uri)
 {
     var key = uri.Scheme.ToLowerInvariant()
         + uri.Host.ToLowerInvariant()
         + uri.Port.ToString().ToLowerInvariant()
         + uri.AbsolutePath.ToLowerInvariant();
     lock (globalContainers)
     {
         if (globalContainers.ContainsKey(key))
             return globalContainers[key];
         var container = new ClientContainer(uri);
         globalContainers.Add(key, container);
         return container;
     }
 }
Esempio n. 2
0
        public static ClientContainer GetGlobalContainerFor(Uri uri)
        {
            var key = uri.Scheme.ToLowerInvariant()
                      + uri.Host.ToLowerInvariant()
                      + uri.Port.ToString().ToLowerInvariant()
                      + uri.AbsolutePath.ToLowerInvariant();

            lock (globalContainers)
            {
                if (globalContainers.ContainsKey(key))
                {
                    return(globalContainers[key]);
                }
                var container = new ClientContainer(uri);
                globalContainers.Add(key, container);
                return(container);
            }
        }
Esempio n. 3
0
 private AmqpClient(ClientContainer container)
 {
     this.container = container;
     this.container.AddAmqpClientRef(this);
 }
Esempio n. 4
0
 public static AmqpClient CreateFromURI(Uri uri)
 {
     return(new AmqpClient(ClientContainer.GetGlobalContainerFor(uri)));
 }
Esempio n. 5
0
 private AmqpClient(ClientContainer container)
 {
     this.container = container;
     this.container.AddAmqpClientRef(this);
 }