示例#1
0
        public bool Setup(string serverType, string bootstrapUri, string assemblyImportRoot, IServerConfig config, string startupConfigFile)
        {
            m_AssemblyImporter = new AssemblyImport(assemblyImportRoot);

            if (!string.IsNullOrEmpty(startupConfigFile))
            {
                AppDomain.CurrentDomain.ResetConfiguration(startupConfigFile);
            }

            var serviceType = Type.GetType(serverType);

            m_AppServer = (IManagedApp)Activator.CreateInstance(serviceType);

            var bootstrap = (IBootstrap)Activator.GetObject(typeof(IBootstrap), bootstrapUri);

            var ret = m_AppServer.Setup(bootstrap, config);

            if (ret)
            {
                m_Log = ((IAppServer)m_AppServer).Logger;
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            }

            return(ret);
        }
示例#2
0
        protected override bool Setup(IManagedApp managedApp, IServerConfig config)
        {
            var ret = managedApp.Setup(m_RemoteBootstrapWrap, config);

            if (!ret)
                return false;

            SetupRecycleTriggers(managedApp, config);
            return ret;
        }
示例#3
0
        protected override bool Setup(IManagedApp managedApp, IServerConfig config)
        {
            var ret = managedApp.Setup(m_RemoteBootstrapWrap, config);

            if (!ret)
            {
                return(false);
            }

            SetupRecycleTriggers(managedApp, config);
            return(ret);
        }
示例#4
0
        public bool Setup(string serverType, string bootstrapUri, string assemblyImportRoot, IServerConfig config)
        {
            m_AssemblyImporter = new AssemblyImport(assemblyImportRoot);

            var serviceType = Type.GetType(serverType);
            m_AppServer = (IManagedApp)Activator.CreateInstance(serviceType);

            var bootstrap = (IBootstrap)Activator.GetObject(typeof(IBootstrap), bootstrapUri);

            var ret = m_AppServer.Setup(bootstrap, config);

            if (ret)
            {
                m_Log = ((IAppServer)m_AppServer).Logger;
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            }

            return ret;
        }
示例#5
0
 internal virtual bool SetupWorkItemInstance(IManagedApp workItem, IServerConfig serverConfig)
 {
     return(workItem.Setup(this, serverConfig));
 }
示例#6
0
 internal virtual bool SetupWorkItemInstance(IManagedApp workItem, IServerConfig serverConfig)
 {
     return workItem.Setup(this, serverConfig);
 }
 internal override bool SetupWorkItemInstance(IManagedApp workItem, IServerConfig serverConfig)
 {
     return workItem.Setup(m_Bootstrap, serverConfig);
 }
示例#8
0
 protected override bool Setup(IManagedApp managedApp, IServerConfig config)
 {
     return managedApp.Setup(m_RemoteBootstrapWrap, config);
 }
示例#9
0
 protected virtual bool Setup(IManagedApp managedApp, IServerConfig config)
 {
     return managedApp.Setup(this, config);
 }
示例#10
0
 public bool Setup(IBootstrap bootstrap, IServerConfig config)
 {
     return(m_ManagedApp.Setup(bootstrap, config));
 }
示例#11
0
 protected virtual bool Setup(IManagedApp managedApp, IServerConfig config)
 {
     return(managedApp.Setup(this, config));
 }
 internal override bool SetupWorkItemInstance(IManagedApp workItem, IServerConfig serverConfig)
 {
     return(workItem.Setup(m_Bootstrap, serverConfig));
 }
示例#13
0
 /// <summary>
 /// Setups the specified root config.
 /// </summary>
 /// <param name="bootstrap">The bootstrap.</param>
 /// <param name="config">The socket server instance config.</param>
 /// <returns></returns>
 public bool Setup(IBootstrap bootstrap, IServerConfig config)
 {
     return(m_AppServer.Setup(bootstrap, config));
 }