Esempio n. 1
0
 public SupportEnumTwoEvent(
     string id,
     SupportEnumTwo value)
 {
     Id = id;
     Value = value;
 }
Esempio n. 2
0
        public static bool CheckEventBeanPropInt(this SupportEnumTwo @enum, EventBean @event, String propertyName)
        {
            var value = @event.Get(propertyName);

            if (value == null && (!value.IsInt()))
            {
                return(false);
            }
            return(GetAssociatedValue(@enum) == (int?)value);
        }
Esempio n. 3
0
        public static bool CheckEventBeanPropInt(
            this SupportEnumTwo enumValue,
            EventBean @event,
            string propertyName)
        {
            var value = @event.Get(propertyName);
            if (value == null && !(value is int?)) {
                return false;
            }

            return GetAssociatedValue(enumValue) == (int?) value;
        }
Esempio n. 4
0
        public static string[] GetMystrings(this SupportEnumTwo value)
        {
            switch (value) {
                case SupportEnumTwo.ENUM_VALUE_1:
                    return new[] {"1", "0", "0"};

                case SupportEnumTwo.ENUM_VALUE_2:
                    return new[] {"2", "0", "0"};

                case SupportEnumTwo.ENUM_VALUE_3:
                    return new[] {"3", "0", "0"};

                default:
                    throw new ArgumentException(nameof(value));
            }
        }
Esempio n. 5
0
        public static int GetAssociatedValue(this SupportEnumTwo value)
        {
            switch (value) {
                case SupportEnumTwo.ENUM_VALUE_1:
                    return 100;

                case SupportEnumTwo.ENUM_VALUE_2:
                    return 200;

                case SupportEnumTwo.ENUM_VALUE_3:
                    return 300;

                default:
                    throw new ArgumentException(nameof(value));
            }
        }
Esempio n. 6
0
        public static int GetAssociatedValue(this SupportEnumTwo @enum)
        {
            switch (@enum)
            {
            case SupportEnumTwo.ENUM_VALUE_1:
                return(100);

            case SupportEnumTwo.ENUM_VALUE_2:
                return(200);

            case SupportEnumTwo.ENUM_VALUE_3:
                return(300);
            }

            throw new ArgumentException();
        }
Esempio n. 7
0
        public static string[] GetMystrings(this SupportEnumTwo @enum)
        {
            switch (@enum)
            {
            case SupportEnumTwo.ENUM_VALUE_1:
                return(new String[] { "1", "0", "0" });

            case SupportEnumTwo.ENUM_VALUE_2:
                return(new String[] { "2", "0", "0" });

            case SupportEnumTwo.ENUM_VALUE_3:
                return(new String[] { "3", "0", "0" });
            }

            throw new ArgumentException();
        }
Esempio n. 8
0
 public static Nested GetNested(this SupportEnumTwo enumValue)
 {
     return new Nested(GetAssociatedValue(enumValue));
 }
Esempio n. 9
0
 public static bool CheckAssociatedValue(
     this SupportEnumTwo enumValue,
     int value)
 {
     return GetAssociatedValue(enumValue) == value;
 }
Esempio n. 10
0
 public static Nested GetNested(this SupportEnumTwo @enum)
 {
     return(new Nested(GetAssociatedValue(@enum)));
 }
Esempio n. 11
0
 public static bool CheckAssociatedValue(this SupportEnumTwo @enum, int value)
 {
     return(GetAssociatedValue(@enum) == value);
 }