public static ValidationResult ValidateInput(PostProcessorInput input) { ValidationResult tempResult; tempResult = ValidateInputFolderExistence(input.InputFolder); if (!tempResult.IsValid) { return(tempResult); } tempResult = ValidatePhotonDatabaseExistence(input.DetectorInputs, input.InputFolder); if (!tempResult.IsValid) { return(tempResult); } tempResult = ValidateSimulationInputExistence(input.DatabaseSimulationInputFilename, input.InputFolder); if (!tempResult.IsValid) { return(tempResult); } return(new ValidationResult( true, "PostProcessorinput: input must be valid")); }
/// <summary> /// validate infile as well as overriding command line input /// </summary> /// <param name="input">PostProcessorInput file</param> /// <param name="inpath">command line option inpath</param> /// <returns></returns> public static ValidationResult ValidateInput(PostProcessorInput input, string inpath) { ValidationResult tempResult; tempResult = ValidateTissueOpticalProperties(input.DetectorInputs); if (!tempResult.IsValid) { return(tempResult); } tempResult = ValidateInputFolderExistence(Path.Combine(inpath, input.InputFolder)); if (!tempResult.IsValid) { return(tempResult); } tempResult = ValidatePhotonDatabaseExistence(input.DetectorInputs, Path.Combine(inpath, input.InputFolder)); if (!tempResult.IsValid) { return(tempResult); } tempResult = ValidateSimulationInputExistence(input.DatabaseSimulationInputFilename, Path.Combine(inpath, input.InputFolder)); if (!tempResult.IsValid) { return(tempResult); } return(new ValidationResult( true, "PostProcessorinput: input must be valid")); }