Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AsyncSqlProjector"/> class.
        /// </summary>
        /// <param name="resolver">The handler resolver.</param>
        /// <param name="executor">The command executor.</param>
        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="resolver"/> or <paramref name="executor"/> is <c>null</c>.</exception>
        public AsyncSqlProjector(SqlProjectionHandlerResolver resolver, IAsyncSqlNonQueryCommandExecutor executor)
        {
            if (resolver == null) throw new ArgumentNullException("resolver");
            if (executor == null) throw new ArgumentNullException("executor");

            _resolver = resolver;
            _executor = executor;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AsyncSqlProjector"/> class.
        /// </summary>
        /// <param name="resolver">The handler resolver.</param>
        /// <param name="executor">The command executor.</param>
        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="resolver"/> or <paramref name="executor"/> is <c>null</c>.</exception>
        public AsyncSqlProjector(SqlProjectionHandlerResolver resolver, IAsyncSqlNonQueryCommandExecutor executor)
        {
            if (resolver == null)
            {
                throw new ArgumentNullException("resolver");
            }
            if (executor == null)
            {
                throw new ArgumentNullException("executor");
            }

            _resolver = resolver;
            _executor = executor;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncSqlProjector"/> class.
 /// </summary>
 /// <param name="handlers">The handlers.</param>
 /// <param name="executor">The command executor.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="handlers"/> or <paramref name="executor"/> is <c>null</c>.</exception>
 public AsyncSqlProjector(SqlProjectionHandler[] handlers, IAsyncSqlNonQueryCommandExecutor executor)
 {
     if (handlers == null)
     {
         throw new ArgumentNullException("handlers");
     }
     if (executor == null)
     {
         throw new ArgumentNullException("executor");
     }
     _handlers = handlers.
                 GroupBy(handler => handler.Message).
                 ToDictionary(@group => @group.Key, @group => @group.ToArray());
     _executor = executor;
 }
Ejemplo n.º 4
0
 private static AsyncSqlProjector SutFactory(SqlProjectionHandlerResolver resolver, IAsyncSqlNonQueryCommandExecutor executor)
 {
     return new AsyncSqlProjector(resolver, executor);
 }
Ejemplo n.º 5
0
 private static AsyncSqlProjector SutFactory(IAsyncSqlNonQueryCommandExecutor executor)
 {
     return SutFactory(message => new SqlProjectionHandler[0], executor);
 }
Ejemplo n.º 6
0
 private static AsyncSqlProjector SutFactory(SqlProjectionHandler[] handlers, IAsyncSqlNonQueryCommandExecutor executor)
 {
     return(new AsyncSqlProjector(handlers, executor));
 }
Ejemplo n.º 7
0
 private static AsyncSqlProjector SutFactory(IAsyncSqlNonQueryCommandExecutor executor)
 {
     return(SutFactory(new SqlProjectionHandler[0], executor));
 }
Ejemplo n.º 8
0
 private static AsyncSqlProjector SutFactory(SqlProjectionHandlerResolver resolver, IAsyncSqlNonQueryCommandExecutor executor)
 {
     return(new AsyncSqlProjector(resolver, executor));
 }