} // Parameters public string Validate(string ownerTag) { if (string.IsNullOrEmpty(Name)) { return(ConfigCommon.ErrorMissingEmptyAttribute("name", ownerTag)); } // if if (string.IsNullOrEmpty(Path)) { return(ConfigCommon.ErrorMissingEmpty(ownerTag)); } // if if (!System.IO.File.Exists(Path)) { return(string.Format(Properties.Texts.RecorderConfigValidationPathNotFound, Name, Path)); } // if var validationError = ConfigCommon.ValidateArray(Arguments, "Argument", "Arguments", ownerTag); if (validationError != null) { return(validationError); } for (int index = 0; index < Arguments.Length; index++) { Arguments[index] = ConfigCommon.Normalize(Arguments[index]); if (string.IsNullOrEmpty(Arguments[index])) { ConfigCommon.ErrorMissingEmpty("Argument", "Arguments");; } // if } // for return(null); } // Validate
} // Value public string Validate(string ownerTag) { if (string.IsNullOrEmpty(Name)) { return(ConfigCommon.ErrorMissingEmptyAttribute("name", ownerTag)); } // if if (string.IsNullOrEmpty(Path)) { return(ConfigCommon.ErrorMissingEmpty(ownerTag)); } // if if ((!Path.StartsWith("\\")) || (Path.EndsWith("\\"))) { return(string.Format(Properties.Texts.RecordTaskSchedulerFolderValidationPath, Path, ownerTag)); } // if return(null); } // Validate
} // IsDefaultSaveLocation public string Validate(string ownerTag) { /* * if (string.IsNullOrEmpty(Name)) * { * return ConfigCommon.ErrorMissingEmptyAttribute("name", ownerTag); * } // if */ if (string.IsNullOrEmpty(Path)) { return(ConfigCommon.ErrorMissingEmpty(ownerTag)); } // if if (!ConfigCommon.IsAbsoluteWindowsPath(Path)) { return(string.Format(Properties.Texts.RecordSaveLocationValidationAbsolutePath, Path, ownerTag)); } // if return(null); } // Validate