/// <summary> /// Initializes a new instance of the <see cref="SqlProjector"/> 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 SqlProjector(SqlProjectionHandlerResolver resolver, ISqlNonQueryCommandExecutor 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="SqlProjector"/> 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 SqlProjector(SqlProjectionHandlerResolver resolver, ISqlNonQueryCommandExecutor 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="SqlProjector"/> 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 SqlProjector(SqlProjectionHandler[] handlers, ISqlNonQueryCommandExecutor 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 SqlProjector SutFactory(SqlProjectionHandler[] handlers, ISqlNonQueryCommandExecutor executor) { return(new SqlProjector(handlers, executor)); }
private static SqlProjector SutFactory(ISqlNonQueryCommandExecutor executor) { return(SutFactory(new SqlProjectionHandler[0], executor)); }
private static SqlProjector SutFactory(SqlProjectionHandlerResolver resolver, ISqlNonQueryCommandExecutor executor) { return new SqlProjector(resolver, executor); }
private static SqlProjector SutFactory(ISqlNonQueryCommandExecutor executor) { return SutFactory(Resolve.WhenEqualToHandlerMessageType(new SqlProjectionHandler[0]), executor); }
private static SqlProjector SutFactory(SqlProjectionHandlerResolver resolver, ISqlNonQueryCommandExecutor executor) { return(new SqlProjector(resolver, executor)); }
private static SqlProjector SutFactory(ISqlNonQueryCommandExecutor executor) { return(SutFactory(Resolve.WhenEqualToHandlerMessageType(new SqlProjectionHandler[0]), executor)); }