예제 #1
0
        public HostController(ServiceDirectory directory)
        {
            Directory = directory;
            Status = HostStatus.Created;
            Name = directory.Folder.Name;

            MonitoringTask = new IntervalTask("HostMonitor", CheckStatus, TimeSpan.FromMinutes(1));
        }
예제 #2
0
        public HostController(IServiceController controller, ServiceDirectory directory)
        {
            _Controller = controller;
            Name = directory.Folder.Name;
            Status = HostStatus.Created;

            // create our app domain
            var setup = AppDomain.CurrentDomain.SetupInformation;
            setup.ShadowCopyFiles = "true";
            setup.ConfigurationFile = directory.ConfigurationFile.FullName;
            setup.ApplicationBase = directory.Folder.FullName;

            log.Debug(string.Format("[{0}] Creating AppDomain.", Name));
            Domain = AppDomain.CreateDomain("ServiceHost." + Name, null, setup);
        }
예제 #3
0
 public IHostController CreateController(IServiceController controller, ServiceDirectory directory)
 {
     return new HostController(controller, directory);
 }
 public IHostController CreateController(ServiceDirectory directory)
 {
     return new HostController(directory);
 }