コード例 #1
0
ファイル: BigSqlRunner.cs プロジェクト: 1imn/BigSqlRunner
        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);
        }
コード例 #2
0
ファイル: BigSqlRunner.cs プロジェクト: 1imn/BigSqlRunner
        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);
        }