public static async void Start(Connection conn) { ConnectionManager.Add(conn, "ErrorControlSystemConnection"); ConnectionManager.SetToDefaultConnection("ErrorControlSystemConnection"); await ServerTransmitter.InitialTransmitterAsync(); if (ErrorHandlingOption.EnableNetworkSending && ConnectionManager.GetDefaultConnection().IsReady) { var publicSetting = await ServerTransmitter.SqlServerManager.GetErrorHandlingOptionsAsync(); if (publicSetting != 0) { ErrorHandlingOption.SetSetting(publicSetting); } await CacheController.CheckStateAsync(); } }
public static DateTime GetServerDateTime() { return(ConnectionManager.GetDefaultConnection().IsReady ? ServerTransmitter.FetchServerDataTime() : DateTime.Now); }