public static TryLoadCommonGlobalSettings LoadMonitorCommonGlobalSettings() { var loadFromJsonResult = LoadFromJson(); if (!loadFromJsonResult.IsComplete) { return(new TryLoadCommonGlobalSettings(false, loadFromJsonResult.Message)); } string exceptionMsg; if (!SqlWorks.CheckSQL_Connection(MainSettings.JsonSettings.ConnectionString, out exceptionMsg)) { return(new TryLoadCommonGlobalSettings(false, $"Ошибка подключения к SQL-базе заданий.\r\nПричина: {exceptionMsg}")); } _globalSettings = new CommonGlobalSettings(); return(_globalSettings.LoadCommonGlobalSettings()); }
public static TryLoadCommonGlobalSettings LoadAgentCommonGlobalSettings() { _globalSettings = new CommonGlobalSettings(); return(_globalSettings.LoadCommonGlobalSettings()); }