public virtual void Init()
        {
            serverDomain = AppDomainFactory.Create("server");
            clientDomain = AppDomainFactory.Create("client");

            serverContainer = CreateRemoteContainer(serverDomain, GetServerConfigFile());
        }
        public override void Init()
        {
            base.Init();

            serverClient          = AppDomainFactory.Create("serverClient");
            serverClientContainer = GetRemoteContainer(serverClient, "server_client_kernelcomponent.xml");
        }
        // Create isn't protected (so the Demands aren't on the class)

        private void Create()
        {
            try {
                adf.Create(null, null, null, null, null, 0);
            }
            catch (NullReferenceException) {
                // MS
            }
            catch (NotImplementedException) {
                // Mono
            }
        }
        public static CoreControler Create()
        {
            AppDomain domain = AppDomainFactory.Create("AgentCore");
            Assembly  asm    = Assembly.GetAssembly(typeof(CoreFactory));

            CoreInitializer initializer = (CoreInitializer)domain.CreateInstanceFromAndUnwrap(
                typeof(CoreInitializer).Assembly.Location, typeof(CoreInitializer).FullName);
            Guid coreId = initializer.Id;

            if (coreId == Guid.Empty)
            {
                AppDomain.Unload(domain);
                throw new Exception("Error in CoreInitializer");
            }
            _cores.AddOrUpdate(coreId, new CoreFactoryItem(domain, initializer, null),
                               (id, tuple) => tuple);

            CoreControler remoteControl = new CoreControler(coreId);

            remoteControl.OnDispose += Destroy;
            return(remoteControl);
        }
Beispiel #5
0
 private void StartServer()
 {
     serverDomain    = AppDomainFactory.Create("server");
     serverContainer = CreateRemoteContainer(serverDomain, GetServerConfigFile());
 }