src/Projac.Sql/SqlProjection.cs
/// <summary>
///     Specifies the non query command enumeration returning handler to be invoked when a particular message occurs.
/// </summary>
/// <typeparam name="TMessage">The type of the message.</typeparam>
/// <param name="handler">The command enumeration returning handler.</param>
/// <exception cref="System.ArgumentNullException">Thrown when <paramref name="handler" /> is <c>null</c>.</exception>
Specifies the non query command enumeration returning handler to be invoked when a particular message occurs.
Specifies the non query command enumeration returning handler to be invoked when a particular message occurs .
protected void When<TMessage>(Func<TMessage, IEnumerable<SqlNonQueryCommand>> handler)
        {
            if (handler == null) throw new ArgumentNullException("handler");
            _handlers.Add(new SqlProjectionHandler(typeof(TMessage), message => handler((TMessage)message)));
        }
protected void When < TMessage > ( Func < TMessage , IEnumerable < SqlNonQueryCommand > > handler ) { if ( handler == null ) throw new ArgumentNullException ( " " ) ; _handlers . Add ( new SqlProjectionHandler ( typeof ( TMessage ) , message => handler ( ( TMessage ) message ) ) ) ; }
Specifies the non query command enumeration returning handler to be invoked when a particular message occurs.
Specifies the non query command enumeration returning handler to be invoked when a particular message occurs .
Thrown when  is null
Thrown when is null
handler
Func<TMessage, IEnumerable<SqlNonQueryCommand>>
The command enumeration returning handler.
The command enumeration returning handler .
typeparam
The type of the message.
The type of the message .