/// <summary>
 /// Run when MirrorFreezeCopy Windows Service starts.
 /// </summary>
 /// <param name="args"> Arguments from command line</param>
 protected override void OnStart(string[] args)
 {
     this.eventLog.WriteEntry("MirrorFreezeCopy Windows Service is starting...");
     NLogger.Info("MirrorFreezeCopy Windows Service is starting...");
     this.mirrorFreezeCopyService = new MirrorFreezeCopyService();
     this.mirrorFreezeCopyService.Start();
     this.eventLog.WriteEntry("MirrorFreezeCopy Windows Service started.");
     NLogger.Info("MirrorFreezeCopy Windows Service started.");
 }
        /// <summary>
        /// Run when MirrorFreezeCopy Windows Service continues.
        /// </summary>
        protected override void OnContinue()
        {
            this.eventLog.WriteEntry("MirrorFreezeCopy Windows Service is continuing...");
            NLogger.Info("MirrorFreezeCopy Windows Service is continuing...");

            this.mirrorFreezeCopyService = new MirrorFreezeCopyService();
            this.mirrorFreezeCopyService.Start();

            this.eventLog.WriteEntry("MirrorFreezeCopy Windows Service continued.");
            NLogger.Info("MirrorFreezeCopy Windows Service continued.");
        }
        /// <summary>
        /// Run when MirrorFreezeCopy Windows Service stops.
        /// </summary>
        protected override void OnStop()
        {
            this.eventLog.WriteEntry("MirrorFreezeCopy Windows Service is stopping...");
            NLogger.Info("MirrorFreezeCopy Windows Service is stopping...");

            if (this.mirrorFreezeCopyService != null)
            {
                this.mirrorFreezeCopyService.Dispose();
                this.mirrorFreezeCopyService = null;
            }

            this.eventLog.WriteEntry("MirrorFreezeCopy Windows Service stopped.");
            NLogger.Info("MirrorFreezeCopy Windows Service stopped.");
        }