protected override void OnStart(string[] args) { AppDomain.CurrentDomain.SetData("DataDirectory", "C:\\PhocalStream\\Phocalstream\\Phocalstream_Web\\App_Data"); System.IO.Directory.SetCurrentDirectory(ConfigurationManager.AppSettings["outputPath"]); TcpChannel channel = new TcpChannel(8084); ChannelServices.RegisterChannel(channel, false); RemotingConfiguration.RegisterWellKnownServiceType(typeof(TimeLapseManager), "TimeLapseManager", WellKnownObjectMode.Singleton); ITimeLapseManager manager = (ITimeLapseManager)Activator.GetObject(typeof(ITimeLapseManager), "tcp://localhost:8084/TimeLapseManager"); manager.ImportJobs(ConfigurationManager.AppSettings["outputPath"] + "/jobs.ini"); }
protected override void OnStop() { ITimeLapseManager manager = (ITimeLapseManager)Activator.GetObject(typeof(ITimeLapseManager), "tcp://localhost:8084/TimeLapseManager"); manager.ExportJobs(ConfigurationManager.AppSettings["outputPath"] + "/jobs.ini"); }