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