Пример #1
0
 public async Task LoadLogFile()
 {
     if (NetPatch.FileExists(Config.LogFilePath))
     {
         await LogPool.LoadLogFile(Config.LogFilePath);
     }
 }
Пример #2
0
        public bool LoadConfig(string configFilePath)
        {
            if (string.IsNullOrWhiteSpace(configFilePath))
            {
                throw new ArgumentException($"{nameof(configFilePath)} cannot be null or whitespace", nameof(configFilePath));
            }
            else if (false == NetPatch.FileExists(configFilePath))
            {
                return(false);
            }

            Config = BigSqlRunnerConfig.FromFile(configFilePath);
            return(true);
        }
Пример #3
0
        public static BigSqlRunner FromConfig(string configFilePath)
        {
            if (string.IsNullOrWhiteSpace(configFilePath))
            {
                throw new ArgumentException($"{nameof(configFilePath)} cannot be null or whitespace", nameof(configFilePath));
            }
            else if (false == NetPatch.FileExists(configFilePath))
            {
                return(null);
            }

            var config       = BigSqlRunnerConfig.FromFile(configFilePath);
            var bigSqlRunner = new BigSqlRunner(config);

            return(bigSqlRunner);
        }