Example #1
0
        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;
        }
Example #2
0
        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);
 }
Example #4
0
        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);
        }
Example #5
0
        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);
        }
Example #6
0
 protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData)
 {
     return null;
 }
Example #7
0
 public override OracleParameter BuildParameter(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData, int position)
 {
     return new OracleParameter(GetFormattedParameterName(position), DbType, ParameterDirection.Output);
 }
Example #8
0
 protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData)
 {
     return(SerializeDataPropertiesToString(_getDataProperties.Invoke(@event), @event));
 }
Example #9
0
        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);
        }
Example #10
0
 protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData)
 {
     return SerializeDataPropertiesToString(_getDataProperties.Invoke(@event), @event);
 }
Example #11
0
 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;
 }
Example #12
0
 protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData)
 {
     return(_valueFromMetaData.Invoke(metaData));
 }
Example #13
0
 protected override object GetValue(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData)
 {
     return(null);
 }
Example #14
0
 public override OracleParameter BuildParameter(PropertyInfo[] propertiesOnEvent, IEvent @event, EventMetaData metaData, int position)
 {
     return(new OracleParameter(GetFormattedParameterName(position), DbType, ParameterDirection.Output));
 }