Exemple #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;
     }
 }
Exemple #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);
            }
        }
Exemple #3
0
 private AmqpClient(ClientContainer container)
 {
     this.container = container;
     this.container.AddAmqpClientRef(this);
 }
Exemple #4
0
 public static AmqpClient CreateFromURI(Uri uri)
 {
     return(new AmqpClient(ClientContainer.GetGlobalContainerFor(uri)));
 }
Exemple #5
0
 private AmqpClient(ClientContainer container)
 {
     this.container = container;
     this.container.AddAmqpClientRef(this);
 }