Ejemplo n.º 1
0
 public SupportEnumTwoEvent(
     string id,
     SupportEnumTwo value)
 {
     Id = id;
     Value = value;
 }
Ejemplo 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);
        }
Ejemplo 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;
        }
Ejemplo 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));
            }
        }
Ejemplo 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));
            }
        }
Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo n.º 8
0
 public static Nested GetNested(this SupportEnumTwo enumValue)
 {
     return new Nested(GetAssociatedValue(enumValue));
 }
Ejemplo n.º 9
0
 public static bool CheckAssociatedValue(
     this SupportEnumTwo enumValue,
     int value)
 {
     return GetAssociatedValue(enumValue) == value;
 }
Ejemplo n.º 10
0
 public static Nested GetNested(this SupportEnumTwo @enum)
 {
     return(new Nested(GetAssociatedValue(@enum)));
 }
Ejemplo n.º 11
0
 public static bool CheckAssociatedValue(this SupportEnumTwo @enum, int value)
 {
     return(GetAssociatedValue(@enum) == value);
 }