예제 #1
0
파일: Help.cs 프로젝트: chickenlegs0/Luka
        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);
        }
예제 #2
0
파일: Help.cs 프로젝트: chickenlegs0/Luka
        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);
        }
예제 #3
0
파일: Help.cs 프로젝트: chickenlegs0/Luka
        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);
        }
예제 #4
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;
        }
예제 #5
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;
        }
예제 #6
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;
        }