/// <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; }
/// <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; }
/// <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; }
private static AsyncSqlProjector SutFactory(SqlProjectionHandlerResolver resolver, IAsyncSqlNonQueryCommandExecutor executor) { return new AsyncSqlProjector(resolver, executor); }
private static AsyncSqlProjector SutFactory(IAsyncSqlNonQueryCommandExecutor executor) { return SutFactory(message => new SqlProjectionHandler[0], executor); }
private static AsyncSqlProjector SutFactory(SqlProjectionHandler[] handlers, IAsyncSqlNonQueryCommandExecutor executor) { return(new AsyncSqlProjector(handlers, executor)); }
private static AsyncSqlProjector SutFactory(IAsyncSqlNonQueryCommandExecutor executor) { return(SutFactory(new SqlProjectionHandler[0], executor)); }
private static AsyncSqlProjector SutFactory(SqlProjectionHandlerResolver resolver, IAsyncSqlNonQueryCommandExecutor executor) { return(new AsyncSqlProjector(resolver, executor)); }