private static void DoKeepAlive() { try { // Inform the local system we need it. SetThreadExecutionState(EXECUTION_STATE.ES_SYSTEM_REQUIRED); // Tell the server we need it. using (CoreServiceAgent coreAgent = new CoreServiceAgent()) { coreAgent.KeepServerAlive(); } } catch { } }
public static void KeepImportServiceAlive() { try { Debug.WriteLine(String.Format("{0:HH:mm:ss} - KeepImportServiceAlive called", DateTime.Now)); // Inform the local system we need it. SetThreadExecutionState(EXECUTION_STATE.ES_SYSTEM_REQUIRED); // Tell the server we still need it. using (CoreServiceAgent coreServiceAgent = new CoreServiceAgent()) { coreServiceAgent.KeepServerAlive(); } } catch { } }
public static void KeepImportServiceAlive() { try { Debug.WriteLine(String.Format("{0:HH:mm:ss} - KeepImportServiceAlive called", DateTime.Now)); // Inform the local system we need it. SetThreadExecutionState(EXECUTION_STATE.ES_SYSTEM_REQUIRED); // Tell the server we still need it. using (CoreServiceAgent coreServiceAgent = new CoreServiceAgent()) { coreServiceAgent.KeepServerAlive(); } } catch { } }
private static void DoKeepAlive() { try { // Inform the local system we need it. SetThreadExecutionState(EXECUTION_STATE.ES_SYSTEM_REQUIRED); // Tell the server we need it. using (CoreServiceAgent coreAgent = new CoreServiceAgent()) { coreAgent.KeepServerAlive(); } } catch { } }