private void OnExecute() { var configBuilder = new ConfigurationBuilder().AddEnvironmentVariables("LDG_"); if (AdvancedFile != null) { configBuilder.AddIniFile(Path.GetFullPath(AdvancedFile), false); } var passedConfig = configBuilder.Build(); var generatorConfig = LargeDatasetConfiguration.CreateDefault(); ExtractMultiplierValue(passedConfig, "create_job_count", x => generatorConfig.CreateJobCount = (int)x); ExtractMultiplierValue(passedConfig, "write_job_count", x => generatorConfig.WriteJobCount = (int)x); ExtractValue <double>(passedConfig, "queue_size_multiplier", x => generatorConfig.QueueSizeMultiplier = x); var generator = new LargeDatasetGenerator(generatorConfig) { BatchSize = BatchSize, Count = Count }; if (ListOutputs) { generator.ListOutput(); return; } if (ListGenerators) { generator.ListGenerators(); return; } generator.Generate(Input, OutputType, RemainingArguments); }
/// <summary> /// Constructor /// </summary> /// <param name="configuration">Optional configuration containing advanced parameters</param> public LargeDatasetGenerator(ILargeDatasetConfiguration configuration = null) { _configuration = configuration ?? LargeDatasetConfiguration.CreateDefault(); }