public static ParametersPack Create( AnalysisOptions analysisOptions, AlgorithmType algorithmType, int startValue, int endValue, int extrapolationSegmentValue, int launchesNumber, int step) { analysisOptions.ThrowIfNull(nameof(analysisOptions)); algorithmType.ThrowIfNull(nameof(algorithmType)); return(new ParametersPack( analysisProgramName: new FileInfo(algorithmType.AnalysisProgramName), algorithmType: algorithmType, startValue: startValue, endValue: endValue, extrapolationSegmentValue: extrapolationSegmentValue, launchesNumber: launchesNumber, step: step, outputFilenamePattern: PathHelper.ResolveFullPath(algorithmType.OutputFilenamePattern), commonAnalysisFilenameSuffix: analysisOptions.CommonAnalysisFilenameSuffix, outputFileExtension: analysisOptions.OutputFileExtension )); }
private ParametersPack( FileInfo analysisProgramName, AlgorithmType algorithmType, int startValue, int endValue, int extrapolationSegmentValue, int launchesNumber, int step, string outputFilenamePattern, string commonAnalysisFilenameSuffix, string outputFileExtension) { AnalysisProgramName = analysisProgramName.ThrowIfNull(nameof(analysisProgramName)); AlgorithmType = algorithmType.ThrowIfNull(nameof(algorithmType)); StartValue = startValue.ThrowIfValueIsOutOfRange(nameof(startValue), 1, int.MaxValue); EndValue = endValue.ThrowIfValueIsOutOfRange(nameof(endValue), startValue, int.MaxValue); ExtrapolationSegmentValue = extrapolationSegmentValue.ThrowIfValueIsOutOfRange(nameof(extrapolationSegmentValue), endValue, int.MaxValue); LaunchesNumber = launchesNumber.ThrowIfValueIsOutOfRange(nameof(launchesNumber), 1, int.MaxValue); Step = step.ThrowIfValueIsOutOfRange(nameof(step), 1, int.MaxValue); OutputFilenamePattern = outputFilenamePattern.ThrowIfNullOrWhiteSpace(nameof(outputFilenamePattern)); CommonAnalysisFilenameSuffix = commonAnalysisFilenameSuffix.ThrowIfNullOrWhiteSpace(nameof(commonAnalysisFilenameSuffix)); OutputFileExtension = outputFileExtension.ThrowIfNullOrWhiteSpace(nameof(outputFileExtension)); }