/// <summary>
 ///     Ctor.
 /// </summary>
 public ConfigurationCommonEventTypeMeta()
 {
     _classPropertyResolutionStyle = PropertyResolutionStyle.DEFAULT;
     _defaultAccessorStyle = AccessorStyle.NATIVE;
     _defaultEventRepresentation = EventUnderlyingTypeExtensions.GetDefault();
     _avroSettings = new AvroSettingsConfig();
 }
Пример #2
0
 /// <summary>Ctor.</summary>
 public EventMetaConfig()
 {
     AnonymousCacheSize           = 5;
     ClassPropertyResolutionStyle = PropertyResolutionStyle.DEFAULT;
     DefaultAccessorStyle         = AccessorStyleEnum.NATIVE;
     DefaultEventRepresentation   = EventUnderlyingTypeExtensions.GetDefault();
     AvroSettings = new AvroSettings();
 }
Пример #3
0
 public static EventUnderlyingType GetUnderlyingType(this EventRepresentationChoice enumValue)
 {
     return enumValue switch {
         EventRepresentationChoice.OBJECTARRAY => EventUnderlyingType.OBJECTARRAY,
         EventRepresentationChoice.MAP => EventUnderlyingType.MAP,
         EventRepresentationChoice.AVRO => EventUnderlyingType.AVRO,
         EventRepresentationChoice.JSON => EventUnderlyingType.JSON,
         EventRepresentationChoice.JSONCLASSPROVIDED => EventUnderlyingType.JSON,
         EventRepresentationChoice.DEFAULT => EventUnderlyingTypeExtensions.GetDefault(),
         _ => throw new ArgumentException("invalid value for EnumValue", nameof(enumValue))
     };
 }
Пример #4
0
        public static EventUnderlyingType GetUnderlyingType(this EventRepresentationChoice enumValue)
        {
            switch (enumValue)
            {
            case EventRepresentationChoice.ARRAY:
                return(EventUnderlyingType.OBJECTARRAY);

            case EventRepresentationChoice.MAP:
                return(EventUnderlyingType.MAP);

            case EventRepresentationChoice.AVRO:
                return(EventUnderlyingType.AVRO);

            case EventRepresentationChoice.DEFAULT:
                return(EventUnderlyingTypeExtensions.GetDefault());
            }

            throw new ArgumentException("invalid value for enumValue", "enumValue");
        }