public override OracleParameter BuildParameter(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData, int position) { var value = GetValue(propertiesOnEvent, @event, metaData) as string; var param = new OracleParameter(GetFormattedParameterName(position), DbType); param.Size = value.Length; param.Value = value; return param; }
protected virtual object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData) { var property = propertiesOnEvent.Single(pi => pi.Name.Equals(_name, StringComparison.InvariantCultureIgnoreCase)); var value = property.GetValue(@event, null); if (value is Guid) return ((Guid)value).ToByteArray(); if (value is EventSourceVersion) return ((EventSourceVersion)value).Combine(); return value; }
protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData) { return _valueFromMetaData.Invoke(metaData); }
protected virtual object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData) { var property = propertiesOnEvent.Single(pi => pi.Name.Equals(_name, StringComparison.InvariantCultureIgnoreCase)); var value = property.GetValue(@event, null); if (value is Guid) { return(((Guid)value).ToByteArray()); } if (value is EventSourceVersion) { return(((EventSourceVersion)value).Combine()); } return(value); }
public virtual OracleParameter BuildParameter(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData, int position) { var param = _size > 0 ? new OracleParameter(GetFormattedParameterName(position), _dbType, _size) : new OracleParameter(GetFormattedParameterName(position), _dbType); param.Value = GetValue(propertiesOnEvent, @event, metaData); return(param); }
protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData) { return null; }
public override OracleParameter BuildParameter(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData, int position) { return new OracleParameter(GetFormattedParameterName(position), DbType, ParameterDirection.Output); }
protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData) { return(SerializeDataPropertiesToString(_getDataProperties.Invoke(@event), @event)); }
public override OracleParameter BuildParameter(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData, int position) { var value = GetValue(propertiesOnEvent, @event, metaData) as string; var param = new OracleParameter(GetFormattedParameterName(position), DbType); param.Size = value.Length; param.Value = value; return(param); }
protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData) { return SerializeDataPropertiesToString(_getDataProperties.Invoke(@event), @event); }
public virtual OracleParameter BuildParameter(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData, int position) { var param = _size > 0 ? new OracleParameter(GetFormattedParameterName(position), _dbType, _size) : new OracleParameter(GetFormattedParameterName(position), _dbType); param.Value = GetValue(propertiesOnEvent, @event, metaData); return param; }
protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData) { return(_valueFromMetaData.Invoke(metaData)); }
protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData) { return(null); }
public override OracleParameter BuildParameter(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData, int position) { return(new OracleParameter(GetFormattedParameterName(position), DbType, ParameterDirection.Output)); }