private static HelpItem IsStringNullOrEmpty(HelpAttribute help, object instance, object value) { if (value is string && string.IsNullOrEmpty((string)value)) { return(new HelpItem(help.type, help.message)); } return(null); }
private static HelpItem IsValueNull(HelpAttribute help, object instance, object value) { if (value == null || (value is UnityEngine.Object && ((UnityEngine.Object)value) == null)) { return(new HelpItem(help.type, help.message)); } return(null); }
private static HelpItem IsRegexMatch(HelpAttribute help, object instance, object value) { if (value == null) { return(null); } string text = value.ToString(); if (System.Text.RegularExpressions.Regex.IsMatch(text, help.regex)) { return(new HelpItem(help.type, help.message)); } return(null); }
private static HelpItem IsValueNull(HelpAttribute help, object instance, object value) { if (value == null || (value is UnityEngine.Object && ((UnityEngine.Object)value) == null)) return new HelpItem(help.type, help.message); return null; }
private static HelpItem IsStringNullOrEmpty(HelpAttribute help, object instance, object value) { if (value is string && string.IsNullOrEmpty((string)value)) return new HelpItem(help.type, help.message); return null; }
private static HelpItem IsRegexMatch(HelpAttribute help, object instance, object value) { if (value == null) return null; string text = value.ToString(); if (System.Text.RegularExpressions.Regex.IsMatch(text, help.regex)) return new HelpItem(help.type, help.message); return null; }