public DictionaryCopyHeaderInitializer(PropertyInfo propertyInfo, string key) { if (propertyInfo == null) { throw new ArgumentNullException(nameof(propertyInfo)); } _key = key; _headerProperty = WritePropertyCache <SendContext> .GetProperty <THeader>(propertyInfo); }
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 DictionaryCopyPropertyInitializer(PropertyInfo propertyInfo, string key) { if (propertyInfo == null) { throw new ArgumentNullException(nameof(propertyInfo)); } _key = key; _messageProperty = WritePropertyCache <TMessage> .GetProperty <TProperty>(propertyInfo); }
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 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); }
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); }
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); }
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 ProviderPropertyInitializer(IPropertyProvider <TInput, TProperty> propertyProvider, PropertyInfo propertyInfo) { if (propertyProvider == null) { throw new ArgumentNullException(nameof(propertyProvider)); } if (propertyInfo == null) { throw new ArgumentNullException(nameof(propertyInfo)); } _propertyProvider = propertyProvider; _messageProperty = WritePropertyCache <TMessage> .GetProperty <TProperty>(propertyInfo); }
public ProviderHeaderInitializer(IPropertyProvider <TInput, TProperty> propertyProvider, string propertyName) { if (propertyProvider == null) { throw new ArgumentNullException(nameof(propertyProvider)); } if (propertyName == null) { throw new ArgumentNullException(nameof(propertyName)); } _propertyProvider = propertyProvider; _messageProperty = WritePropertyCache <SendContext> .GetProperty <TProperty>(propertyName); }