예제 #1
0
        public static void AddAnnotationForNonMap(
            this EventRepresentationChoice enumValue,
            EPStatementObjectModel model)
        {
            if (enumValue == EventRepresentationChoice.DEFAULT || enumValue == EventRepresentationChoice.MAP) {
                return;
            }

            var part = new AnnotationPart("EventRepresentation");
            switch (enumValue) {
                case EventRepresentationChoice.OBJECTARRAY:
                    part.AddValue("objectarray");
                    break;

                case EventRepresentationChoice.AVRO:
                    part.AddValue("avro");
                    break;

                case EventRepresentationChoice.JSON:
                case EventRepresentationChoice.JSONCLASSPROVIDED:
                    part.AddValue("json");
                    break;

            }

            model.Annotations = Collections.SingletonList(part);
        }
예제 #2
0
        public static void AddAnnotationForNonMap(this EventRepresentationChoice enumValue, EPStatementObjectModel model)
        {
            if (enumValue == EventRepresentationChoice.DEFAULT || enumValue == EventRepresentationChoice.MAP)
            {
                return;
            }
            var part = new AnnotationPart("EventRepresentation");

            if (enumValue == EventRepresentationChoice.ARRAY)
            {
                part.AddValue("objectarray");
            }
            if (enumValue == EventRepresentationChoice.AVRO)
            {
                part.AddValue("avro");
            }
            model.Annotations = Collections.SingletonList(part);
        }
예제 #3
0
        public static void AddAnnotation(this EventRepresentationEnum value, EPStatementObjectModel model)
        {
            if (value == EventRepresentationEnum.DEFAULT)
            {
                return;
            }
            AnnotationPart part = new AnnotationPart(typeof(EventRepresentation).Name);

            part.AddValue("Array", value == EventRepresentationEnum.OBJECTARRAY);
            model.Annotations = Collections.SingletonList(part);
        }