示例#1
0
        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;
            }
        }
示例#2
0
        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;
            }
        }
示例#3
0
        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();
        }
示例#4
0
        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();
        }