public void Start(ZetboxConfig config) { if (container != null) { throw new InvalidOperationException("already started"); } Logging.Configure(); AssemblyLoader.Bootstrap(AppDomain.CurrentDomain, config); container = Program.CreateMasterContainer(config); wcfServer = container.Resolve<IZetboxAppDomain>(); wcfServer.Start(config); }
public void Start(ZetboxConfig config) { if (container != null) { throw new InvalidOperationException("already started"); } Logging.Configure(); AssemblyLoader.Bootstrap(AppDomain.CurrentDomain, config); container = Program.CreateMasterContainer(config); wcfServer = container.Resolve <IZetboxAppDomain>(); wcfServer.Start(config); }
protected override void SetUp(IContainer container) { base.SetUp(container); ResetDatabase(container); AutofacServiceHostFactory.Container = container; var config = container.Resolve <ZetboxConfig>(); using (Log.InfoTraceMethodCall("Starting server domain")) { manager = container.Resolve <IZetboxAppDomain>(); manager.Start(config); } }
public void Start(ZetboxConfig config) { if (config == null) { throw new ArgumentNullException("config"); } using (Logging.Log.DebugTraceMethodCall("Start", "Starting AppDomain for Server")) { var serverConfig = new ZetboxConfig() { ConfigFilePath = config.ConfigFilePath, ConfigName = config.ConfigName, EnableShadowCopy = config.EnableShadowCopy, HostType = HostType.Server, IsFallback = false, Server = config.Server, }; serverDomain = AppDomain.CreateDomain("ServerAppDomain", AppDomain.CurrentDomain.Evidence, AppDomain.CurrentDomain.SetupInformation); AssemblyLoader.Bootstrap(serverDomain, serverConfig); serverManager = (IZetboxAppDomain)serverDomain.CreateInstanceAndUnwrap( "Zetbox.Server.Service", "Zetbox.Server.Service.ServerManager"); serverManager.Start(serverConfig); if (clientSponsor == null) { clientSponsor = new ClientSponsor(); clientSponsor.RenewalTime = TimeSpan.FromMinutes(2); } clientSponsor.Register(serverManager as MarshalByRefObject); } }
public void Start(ZetboxConfig config) { using (Logging.Log.DebugTraceMethodCall("Start", "Starting AppDomain for Server")) { serverDomain = AppDomain.CreateDomain("ServerAppDomain", AppDomain.CurrentDomain.Evidence, AppDomain.CurrentDomain.SetupInformation); AssemblyLoader.Bootstrap(serverDomain, config); serverManager = (IZetboxAppDomain)serverDomain.CreateInstanceAndUnwrap( "Zetbox.Server.Service", "Zetbox.Server.Service.ServerManager"); serverManager.Start(config); if (clientSponsor == null) { clientSponsor = new ClientSponsor(); clientSponsor.RenewalTime = TimeSpan.FromMinutes(2); } clientSponsor.Register(serverManager as MarshalByRefObject); } }
protected override void SetUp(IContainer container) { base.SetUp(container); ResetDatabase(container); AutofacServiceHostFactory.Container = container; var config = container.Resolve<ZetboxConfig>(); using (Log.InfoTraceMethodCall("Starting server domain")) { manager = container.Resolve<IZetboxAppDomain>(); manager.Start(config); } }