/// <summary> /// StartReplayService method implementation /// </summary> private void StartReplayService() { try { _svchost.StartService(this); ReplayClient replaymanager = new ReplayClient(); replaymanager.Initialize(); try { IReplay client = replaymanager.Open(); try { client.WarmUp(); } catch (Exception e) { this.EventLog.WriteEntry(string.Format("Error on WarmUp ReplayService : {0}.", e.Message), EventLogEntryType.Error, 1001); } finally { replaymanager.Close(client); } } finally { replaymanager.UnInitialize(); } } catch (Exception e) { this.EventLog.WriteEntry(string.Format("Error when starting ReplayService : {0}.", e.Message), EventLogEntryType.Error, 1001); } }
/// <summary> /// Pause method iplementation /// </summary> public static void Reset(List <string> computers) { ReplayClient manager = new ReplayClient(); manager.Initialize(); try { IReplay client = manager.Open(); try { client.Reset(computers); } finally { manager.Close(client); } } finally { manager.UnInitialize(); } }
/// <summary> /// Continue method iplementation /// </summary> public static bool Check(List <string> computers, ReplayRecord record) { ReplayClient manager = new ReplayClient(); manager.Initialize(); try { IReplay client = manager.Open(); try { return(client.Check(computers, record)); } finally { manager.Close(client); } } finally { manager.UnInitialize(); } }