/// <summary> /// Reset method implementation /// </summary> public void Reset(List <string> servernames) { try { lock (_lock) { _manager.Reset(); } if (servernames != null) { foreach (string fqdn in servernames) { ReplayClient replaymanager = new ReplayClient(); try { replaymanager.Initialize(fqdn); IReplay client = replaymanager.Open(); try { client.Reset(null); } catch (Exception e) { _log.WriteEntry(string.Format("Error on Check Remote Service method : {0} => {1}.", fqdn, e.Message), EventLogEntryType.Error, 1011); } finally { replaymanager.Close(client); } } catch (Exception e) { _log.WriteEntry(string.Format("Error on Check Remote Service method : {0} => {1}.", fqdn, e.Message), EventLogEntryType.Error, 1011); } } } } catch (Exception e) { _log.WriteEntry(string.Format("Error on Reset Service method : {0}.", e.Message), EventLogEntryType.Error, 1011); } }
/// <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(); } }