コード例 #1
0
 public ValueArrayPropertySpecification(PropertyInfo property, int position, IValueConverter <TValue> valueConverter, IValueFormatter <TValue> valueFormatter)
     : base(property, position)
 {
     _valueConverter = valueConverter;
     _valueFormatter = valueFormatter;
     _sliceFactory   = Multiple;
 }
コード例 #2
0
        public ValueListEntityProperty(Type implementationType, string propertyName, int position, ValueListFactory <TValue> valueFactory, ValueSliceFactory valueSliceFactory)
        {
            if (implementationType == null)
            {
                throw new ArgumentNullException(nameof(implementationType));
            }
            if (propertyName == null)
            {
                throw new ArgumentNullException(nameof(propertyName));
            }
            if (valueFactory == null)
            {
                throw new ArgumentNullException(nameof(valueFactory));
            }
            if (valueSliceFactory == null)
            {
                throw new ArgumentNullException(nameof(valueSliceFactory));
            }

            _position          = position;
            _valueFactory      = valueFactory;
            _valueSliceFactory = valueSliceFactory;

            _writeProperty = new WriteProperty <TEntity, ValueList <TValue> >(implementationType, propertyName);
        }
コード例 #3
0
        public ValueArrayEntityProperty(Type implementationType, string propertyName, int position, ValueArrayFactory <TValue> valueFactory, ValueSliceFactory valueSliceFactory)
        {
            _position          = position;
            _valueFactory      = valueFactory;
            _valueSliceFactory = valueSliceFactory;

            _writeProperty = new WriteProperty <TEntity, ValueArray <TValue> >(implementationType, propertyName);
        }
コード例 #4
0
 public EntityListPropertySpecification(PropertyInfo property, int position)
     : base(property, position)
 {
     _sliceFactory = Single;
 }
コード例 #5
0
 public EntityArrayPropertySpecification(PropertyInfo property, int position)
     : base(property, position)
 {
     _sliceFactory = Multiple;
 }
コード例 #6
0
 public void SetRange()
 {
     _sliceFactory = Range;
 }
コード例 #7
0
 public void SetList()
 {
     _sliceFactory = List;
 }
コード例 #8
0
 public void SetSingle()
 {
     _sliceFactory = Single;
 }
コード例 #9
0
 public void SetParent()
 {
     _sliceFactory = Parent;
 }
コード例 #10
0
 public SetPropertyArrayPropertySpecification(PropertyInfo property, Func <TextSlice, ValueArray <TValue> > valueProvider)
     : base(property, 0)
 {
     _valueProvider = valueProvider;
     _sliceFactory  = Single;
 }