/// <summary>
 /// Creates a new application domain, and adds it to the store. If the domain already exists, does nothing.
 /// </summary>
 public static void CreateDomain(string domainKey)
 {
     //if we already have the domain it doesnt need to be created.
     if (domains.ContainsKey(domainKey)) {
         return;
     }
     AppDomain newDomain = AppDomain.CreateDomain(domainKey);
     //preload assemblies
     foreach (string item in Config.DomainPreloads) {
         newDomain.Load(item);
     }
     //create the domain proxy
     DomainProxy proxy = (DomainProxy)newDomain.CreateInstanceAndUnwrap(typeof(DomainProxy).Assembly.FullName, typeof(DomainProxy).FullName);
     //create the cluster proxy
     ClusterProxy cproxy = new ClusterProxy();
     proxy.ConfigureCluster(cproxy, domainKey);
     //add the data to the lookup tables
     proxies.Add(domainKey, proxy);
     domains.Add(domainKey, newDomain);
 }
        /// <summary>
        /// Creates a new application domain, and adds it to the store. If the domain already exists, does nothing.
        /// </summary>
        public static void CreateDomain(string domainKey)
        {
            //if we already have the domain it doesnt need to be created.
            if (domains.ContainsKey(domainKey))
            {
                return;
            }
            AppDomain newDomain = AppDomain.CreateDomain(domainKey);

            //preload assemblies
            foreach (string item in Config.DomainPreloads)
            {
                newDomain.Load(item);
            }
            //create the domain proxy
            DomainProxy proxy = (DomainProxy)newDomain.CreateInstanceAndUnwrap(typeof(DomainProxy).Assembly.FullName, typeof(DomainProxy).FullName);
            //create the cluster proxy
            ClusterProxy cproxy = new ClusterProxy();

            proxy.ConfigureCluster(cproxy, domainKey);
            //add the data to the lookup tables
            proxies.Add(domainKey, proxy);
            domains.Add(domainKey, newDomain);
        }