/// <summary> /// Defines that the aggregator strategy is used. /// </summary> /// <typeparam name="TQuestion">The type of the question.</typeparam> /// <typeparam name="TAnswer">The type of the answer.</typeparam> /// <typeparam name="TParameter">The type of the parameter.</typeparam> /// <typeparam name="TExpressionResult">The type of the expression result.</typeparam> /// <param name="syntax">The syntax.</param> /// <returns>Aggregator syntax</returns> public static IAggregatorSyntax <TQuestion, TAnswer, TParameter, TExpressionResult> WithAggregatorStrategy <TQuestion, TAnswer, TParameter, TExpressionResult>( this IDefinitionSyntax <TQuestion, TAnswer, TParameter, TExpressionResult> syntax) where TQuestion : IQuestion <TAnswer, TParameter> { Guard.AgainstNullArgument("syntax", syntax); return(syntax.With(new AggregatorStrategy <TQuestion, TAnswer, TParameter, TExpressionResult>())); }
/// <summary> /// Defines that the aggregator strategy is used. /// </summary> /// <typeparam name="TQuestion">The type of the question.</typeparam> /// <typeparam name="TAnswer">The type of the answer.</typeparam> /// <typeparam name="TParameter">The type of the parameter.</typeparam> /// <typeparam name="TExpressionResult">The type of the expression result.</typeparam> /// <param name="syntax">The syntax.</param> /// <returns>Aggregator syntax</returns> public static IAggregatorSyntax <TQuestion, TAnswer, TParameter, TExpressionResult> WithAggregatorStrategy <TQuestion, TAnswer, TParameter, TExpressionResult>( this IDefinitionSyntax <TQuestion, TAnswer, TParameter, TExpressionResult> syntax) where TQuestion : IQuestion <TAnswer, TParameter> { Ensure.ArgumentNotNull(syntax, "syntax"); return(syntax.With(new AggregatorStrategy <TQuestion, TAnswer, TParameter, TExpressionResult>())); }