예제 #1
0
 public BindField(
     TypeBindingInfo bindingInfo,
     FieldBindingInfo fieldBindingInfo)
 {
     _bindingInfo = bindingInfo
                    ?? throw new ArgumentNullException(nameof(bindingInfo));
     _fieldBindingInfo = fieldBindingInfo
                         ?? throw new ArgumentNullException(nameof(fieldBindingInfo));
 }
예제 #2
0
        public IBindField <T> Field <TPropertyType>(
            Expression <Func <T, TPropertyType> > field)
        {
            if (field == null)
            {
                throw new ArgumentNullException(nameof(field));
            }

            FieldBindingInfo fieldBindingInfo = new FieldBindingInfo
            {
                Member = field.ExtractMember()
            };

            _bindingInfo.Fields.Add(fieldBindingInfo);
            return(new BindField <T>(_bindingInfo, fieldBindingInfo));
        }
예제 #3
0
        public BindField(
            TypeBindingInfo bindingInfo,
            FieldBindingInfo fieldBindingInfo)
        {
            if (bindingInfo == null)
            {
                throw new ArgumentNullException(nameof(bindingInfo));
            }

            if (fieldBindingInfo == null)
            {
                throw new ArgumentNullException(nameof(fieldBindingInfo));
            }

            _bindingInfo      = bindingInfo;
            _fieldBindingInfo = fieldBindingInfo;
        }