protected override void OnStart(string[] ignored) { try { if (string.IsNullOrEmpty(bootStrapper) == false) { var assembly = LoadAssembly(); var bootStrapperType = LoadBootStrapperType(assembly); host = new RemoteAppDomainHost(bootStrapperType); host.Configuration(cfg); } else { host = new RemoteAppDomainHost(asm, cfg); } if (string.IsNullOrEmpty(hostType) == false) { host.SetHostType(hostType); } host.Start(); } catch (Exception x) { Log.Fatal("Hosted service failed to start", x); throw; } }
protected override void OnStart(string[] ignored) { if (string.IsNullOrEmpty(bootStrapper) == false) { var assembly = LoadAssembly(); var bootStrapperType = LoadBootStrapperType(assembly); host = new RemoteAppDomainHost(bootStrapperType); host.Configuration(cfg); } else { host = new RemoteAppDomainHost(asm, cfg); } if (string.IsNullOrEmpty(hostType) == false) { host.SetHostType(hostType); } host.Start(); }
protected override void OnStart(string[] ignored) { RemoteAppDomainHost remoteAppDomainHost; if (string.IsNullOrEmpty(bootStrapper) == false) { var assembly = LoadAssembly(); var bootStrapperType = LoadBootStrapperType(assembly); remoteAppDomainHost = new RemoteAppDomainHost(bootStrapperType); remoteAppDomainHost.Configuration(cfg); } else { remoteAppDomainHost = new RemoteAppDomainHost(asm, cfg); } if (string.IsNullOrEmpty(hostType) == false) { remoteAppDomainHost.SetHostType(hostType); } remoteAppDomainHost.Start(); }