public JsonEventBeanPropertyWriterMapProp(
     IJsonDelegate @delegate,
     JsonUnderlyingField field,
     string key) : base(@delegate, field)
 {
     _key = key;
 }
Exemplo n.º 2
0
 public JsonGetterSimpleSchemaWFragmentArray(
     JsonUnderlyingField field,
     string underlyingClassName,
     EventType fragmentType,
     EventBeanTypedEventFactory eventBeanTypedEventFactory) : base(field, underlyingClassName, fragmentType, eventBeanTypedEventFactory)
 {
 }
 public JsonEventBeanPropertyWriterIndexedProp(
     IJsonDelegate @delegate,
     JsonUnderlyingField propertyName,
     int index) : base(@delegate, propertyName)
 {
     _index = index;
 }
Exemplo n.º 4
0
 public JsonEventBeanPropertyWriter(
     IJsonDelegate @delegate,
     JsonUnderlyingField field)
 {
     _delegate = @delegate;
     _field = field;
 }
 public JsonGetterNestedArrayIndexedSchema(
     int index,
     JsonEventPropertyGetter innerGetter,
     string underlyingClassName,
     JsonUnderlyingField field) : base(index, innerGetter, underlyingClassName)
 {
     this._field = field;
 }
Exemplo n.º 6
0
 public JsonGetterMappedSchema(
     string key,
     string underlyingClassName,
     JsonUnderlyingField field)
     : base(key, underlyingClassName)
 {
     this._field = field;
 }
Exemplo n.º 7
0
 public JsonGetterIndexedSchema(
     int index,
     string underlyingClassName,
     EventType optionalInnerType,
     EventBeanTypedEventFactory eventBeanTypedEventFactory,
     JsonUnderlyingField field)
     : base(index, underlyingClassName, optionalInnerType, eventBeanTypedEventFactory)
 {
     this._field = field;
 }
Exemplo n.º 8
0
 public JsonGetterSimpleSchemaBase(
     JsonUnderlyingField field,
     string underlyingClassName,
     EventType fragmentType,
     EventBeanTypedEventFactory eventBeanTypedEventFactory)
 {
     this.Field = field;
     this.UnderlyingClassName = underlyingClassName;
     this.FragmentType = fragmentType;
     this.EventBeanTypedEventFactory = eventBeanTypedEventFactory;
 }
Exemplo n.º 9
0
        public static object GetJsonSimpleProp(
            JsonUnderlyingField field,
            object @object)
        {
            var und = (JsonEventObjectBase) @object;
            if (und.TryGetNativeValue(field.PropertyName, out var value)) {
                return value;
            }

            throw new KeyNotFoundException(field.PropertyName);
        }
Exemplo n.º 10
0
            internal Item(
                JsonUnderlyingField toField,
                JsonUnderlyingField optionalFromField,
                ExprForge forge,
                TypeWidenerSPI optionalWidener)
            {
                if (toField == null)
                {
                    throw new ArgumentException("Null to-field");
                }

                this.toField           = toField;
                this.optionalFromField = optionalFromField;
                this.forge             = forge;
                this.optionalWidener   = optionalWidener;
            }
Exemplo n.º 11
0
        public static bool GetJsonIndexedPropExists(
            object @object,
            JsonUnderlyingField field,
            int index)
        {
            var und = (JsonEventObjectBase) @object;
            if (und.TryGetNativeValue(field.PropertyName, out var value)) {
                if (value == null) {
                    return false;
                }
                if (value is Array array) {
                    return CollectionUtil.ArrayExistsAtIndex(array, index);
                }
                throw new InvalidOperationException(MESSAGE_VALUE_NOT_AN_ARRAY);
            }

            throw new KeyNotFoundException(field.PropertyName);
        }
 public JsonGetterMapRuntimeKeyedSchema(JsonUnderlyingField field)
 {
     this._field = field;
 }
Exemplo n.º 13
0
 public JsonGetterIndexedRuntimeIndexSchema(JsonUnderlyingField field)
 {
     this._field = field;
 }