/// <summary>
 /// Builds the command multiple result expression.
 /// </summary>
 /// <typeparam name="TFilter">The type of the t filter.</typeparam>
 /// <param name="command">The command.</param>
 /// <param name="resultTypes">The result types.</param>
 /// <returns>ICommandMultipleResultExpression&lt;TFilter&gt;.</returns>
 public ICommandMultipleResultExpression <TFilter> BuildCommandMultipleResultExpression <TFilter>(
     ICommandBuilderInfo <TFilter> command, params Type[] resultTypes)
 {
     return(new CommandMultipleResultExpression <TFilter>(
                _propertyMetadataExtractor,
                _multipleResultSetCommandProcessorFactory,
                command, resultTypes));
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CommandSingleResultExpression{TFilter,TResult}" /> class.
 /// </summary>
 /// <param name="propertyMetadataExtractor">The property metadata extractor.</param>
 /// <param name="singleResultSetCommandProcessorFactory">The single result set command processor factory.</param>
 /// <param name="command">The CommandBuilder.</param>
 public CommandSingleResultExpression(
     IPropertyMetadataExtractor propertyMetadataExtractor,
     ISingleResultSetCommandProcessorFactory singleResultSetCommandProcessorFactory,
     ICommandBuilderInfo <TFilter> command)
     : base(propertyMetadataExtractor, command)
 {
     _singleResultSetCommandProcessorFactory = singleResultSetCommandProcessorFactory;
 }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CommandResultExpression{TFilter}" /> class.
        /// </summary>
        /// <param name="command">The CommandBuilder.</param>
        /// <param name="mappingStorage">The mappingStorage.</param>
        internal CommandResultExpression(ICommandBuilderInfo <TFilter> command,
                                         ICommandResultMappingStorage <TFilter> mappingStorage)
        {
            MappingStorage = mappingStorage;

            // ReSharper disable ArrangeThisQualifier
            //Mono required

            this.Command = command;
            // ReSharper restore ArrangeThisQualifier
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CommandMultipleResultExpression{TFilter}" /> class.
        /// </summary>
        /// <param name="propertyMetadataExtractor">The property metadata extractor.</param>
        /// <param name="multipleResultSetCommandProcessorFactory">The multiple result set command processor factory.</param>
        /// <param name="command">The CommandBuilder.</param>
        /// <param name="resultTypes">The result types.</param>
        /// <exception cref="System.ArgumentNullException"></exception>
        /// <exception cref="ArgumentNullException"></exception>
        public CommandMultipleResultExpression(
            IPropertyMetadataExtractor propertyMetadataExtractor,
            IMultipleResultSetCommandProcessorFactory multipleResultSetCommandProcessorFactory,
            ICommandBuilderInfo <TFilter> command, params Type[] resultTypes)
            : base(propertyMetadataExtractor, command)
        {
            if (multipleResultSetCommandProcessorFactory == null)
            {
                throw new ArgumentNullException(nameof(multipleResultSetCommandProcessorFactory));
            }

            _multipleResultSetCommandProcessorFactory = multipleResultSetCommandProcessorFactory;
            _resultTypes = resultTypes;
        }
 /// <summary>
 /// Builds the command processor.
 /// </summary>
 /// <typeparam name="TFilter">The type of the filter.</typeparam>
 /// <param name="command">The command.</param>
 /// <returns>INoResultCommandProcessor&lt;TFilter, TResult&gt;.</returns>
 public virtual INoResultCommandProcessor <TFilter> BuildCommandProcessor <TFilter>(ICommandBuilderInfo <TFilter> command) =>
 new NoResultCommandProcessor <TFilter>(command);
 /// <summary>
 /// Builds the command single result expression.
 /// </summary>
 /// <typeparam name="TFilter">The type of the filter.</typeparam>
 /// <typeparam name="TResult">The type of the result.</typeparam>
 /// <param name="command">The command.</param>
 /// <returns>ICommandMultipleResultExpression&lt;TFilter&gt;.</returns>
 public ICommandSingleResultExpression <TFilter, TResult> BuildCommandSingleResultExpression <TFilter, TResult>(
     ICommandBuilderInfo <TFilter> command)
 {
     return(new CommandSingleResultExpression <TFilter, TResult>(
                _propertyMetadataExtractor, _singleResultSetCommandProcessorFactory, command));
 }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CommandResultExpression{TFilter}" /> class.
 /// </summary>
 /// <param name="propertyMetadataExtractor">The property metadata extractor.</param>
 /// <param name="command">The CommandBuilder.</param>
 protected CommandResultExpression(IPropertyMetadataExtractor propertyMetadataExtractor, ICommandBuilderInfo <TFilter> command)
     : this(command, new CommandResultMappingStorage <TFilter>(propertyMetadataExtractor))
 {
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="NoResultCommandProcessor{TFilter}" /> class.
 /// </summary>
 /// <param name="command">The CommandBuilder.</param>
 public NoResultCommandProcessor(ICommandBuilderInfo <TFilter> command)
 {
     CommandBuilderInfo = command;
 }