public string this[string columnName] { get { switch (columnName) { case "PathOffProject": return(ValidationUtilities.ValidatePathOffProject(PathOffProject)); case "Namespace": return(ValidationUtilities.ValidateNamespace(Namespace)); } return(null); } }
public string this[string columnName] { get { switch (columnName) { case nameof(ViewModelSuffix): return(ValidationUtilities.ValidateViewModelSuffix(ViewModelSuffix)); case nameof(Name): return(ValidationUtilities.ValidateName(Name)); case nameof(SettingsProject): return(SettingsProject == null ? "Required" : null); case nameof(SelectedViewSuffix): return(string.IsNullOrWhiteSpace(SelectedViewSuffix) ? "Required" : null); case nameof(SubLocation): if (!string.IsNullOrEmpty(SubLocation)) { var e = ValidationUtilities.ValidatePathOffProject(SubLocation); if (e != null) { return(e); } var split = SubLocation.Split('/'); foreach (var s in split) { e = ValidationUtilities.ValidateName(s); if (e != null) { return(e); } } } return(null); } return(null); } }