Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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;
        }