public InputPropertyProvider(PropertyInfo propertyInfo)
        {
            if (propertyInfo == null)
            {
                throw new ArgumentNullException(nameof(propertyInfo));
            }

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <TProperty>(propertyInfo);
        }
        public InputValuePropertyProvider(string inputPropertyName)
        {
            if (inputPropertyName == null)
            {
                throw new ArgumentNullException(nameof(inputPropertyName));
            }

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <TProperty>(inputPropertyName);
        }
Exemplo n.º 3
0
        public EntityPropertyConverter(string name)
        {
            _name = name;
            _read = ReadPropertyCache <TEntity> .GetProperty <TProperty>(name);

            _write = WritePropertyCache <TEntity> .GetProperty <TProperty>(name);

            _toEntity   = EntityPropertyTypeConverter.Instance as ITypeConverter <TProperty, EntityProperty>;
            _fromEntity = EntityPropertyTypeConverter.Instance as ITypeConverter <EntityProperty, TProperty>;
        }
        public CopyMessageHeaderInitializer(string headerName, string inputPropertyName = null)
        {
            if (headerName == null)
            {
                throw new ArgumentNullException(nameof(headerName));
            }

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <THeader>(inputPropertyName ?? headerName);

            _headerProperty = WritePropertyCache <SendContext <TMessage> > .GetProperty <THeader>(headerName);
        }
Exemplo n.º 5
0
        public SetHeaderInitializer(string headerName, string inputPropertyName)
        {
            if (headerName == null)
            {
                throw new ArgumentNullException(nameof(headerName));
            }

            _headerName = headerName;

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <THeader>(inputPropertyName);
        }
        public CopyHeaderInitializer(PropertyInfo headerPropertyInfo, PropertyInfo inputPropertyInfo)
        {
            if (headerPropertyInfo == null)
            {
                throw new ArgumentNullException(nameof(headerPropertyInfo));
            }

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <THeader>(inputPropertyInfo);

            _headerProperty = WritePropertyCache <SendContext> .GetProperty <THeader>(headerPropertyInfo);
        }
        public SetStringHeaderInitializer(string headerName, PropertyInfo propertyInfo)
        {
            if (headerName == null)
            {
                throw new ArgumentNullException(nameof(headerName));
            }

            _headerName = headerName;

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <string>(propertyInfo);
        }
Exemplo n.º 8
0
        public CopyPropertyInitializer(string messagePropertyName, string inputPropertyName = null)
        {
            if (messagePropertyName == null)
            {
                throw new ArgumentNullException(nameof(messagePropertyName));
            }

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <TProperty>(inputPropertyName ?? messagePropertyName);

            _messageProperty = WritePropertyCache <TMessage> .GetProperty <TProperty>(messagePropertyName);
        }
Exemplo n.º 9
0
        public CopyObjectPropertyInitializer(PropertyInfo messagePropertyInfo, PropertyInfo inputPropertyInfo)
        {
            if (messagePropertyInfo == null)
            {
                throw new ArgumentNullException(nameof(messagePropertyInfo));
            }

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <TInputProperty>(inputPropertyInfo);

            _messageProperty = WritePropertyCache <TMessage> .GetProperty <object>(messagePropertyInfo);
        }
Exemplo n.º 10
0
        public ConvertMessagePropertyInitializer(IPropertyTypeConverter <TProperty, TInputProperty> converter, string messagePropertyName,
                                                 string inputPropertyName = null)
        {
            if (messagePropertyName == null)
            {
                throw new ArgumentNullException(nameof(messagePropertyName));
            }

            _converter = converter;

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <TInputProperty>(inputPropertyName ?? messagePropertyName);

            _messageProperty = WritePropertyCache <TMessage> .GetProperty <TProperty>(messagePropertyName);
        }
        public PropertyConvertInputValuePropertyProvider(IPropertyConverter <TProperty, TInputProperty> converter, string inputPropertyName)
        {
            if (converter == null)
            {
                throw new ArgumentNullException(nameof(converter));
            }

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

            _converter = converter;

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <TInputProperty>(inputPropertyName);
        }
        public ConvertAsyncInputValuePropertyProvider(ITypeConverter <TProperty, TInputProperty> converter, string propertyName)
        {
            if (converter == null)
            {
                throw new ArgumentNullException(nameof(converter));
            }

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

            _converter = converter;

            _inputProperty = ReadPropertyCache <TInput> .GetProperty <Task <TInputProperty> >(propertyName);
        }
Exemplo n.º 13
0
 public MessageLifetimeScopeIdAccessor(PropertyInfo propertyInfo)
 {
     _property = ReadPropertyCache <TMessage> .GetProperty <TId>(propertyInfo);
 }
Exemplo n.º 14
0
 public MappedProperty(IReadProperty <THidden> wrappedProperty, Func <THidden, TVisible>?getMethod, Action <THidden, TVisible>?setMethod = null)
 {
     _wrappedProperty = wrappedProperty;
     _getMethod       = getMethod;
     _setMethod       = setMethod;
 }
Exemplo n.º 15
0
 public CorrelatedBySetCorrelationId()
 {
     _property = ReadPropertyCache <CorrelatedBy <Guid> > .GetProperty <Guid>(nameof(CorrelatedBy <Guid> .CorrelationId));
 }
 public NullablePropertyMessageCorrelationId(PropertyInfo propertyInfo)
 {
     _property = ReadPropertyCache <T> .GetProperty <Guid?>(propertyInfo);
 }
Exemplo n.º 17
0
 public PropertySetCorrelationId(PropertyInfo propertyInfo)
 {
     _property = ReadPropertyCache <T> .GetProperty <Guid>(propertyInfo);
 }
 public LoadMessageDataPropertyProvider(IMessageDataRepository repository, PropertyInfo property)
 {
     _repository = repository;
     _property   = ReadPropertyCache <TInput> .GetProperty <MessageData <TValue> >(property);
 }