/// <summary> /// Appends a $facet stage to the pipeline. /// </summary> /// <typeparam name="TResult">The type of the result.</typeparam> /// <typeparam name="TNewResult">The type of the new result.</typeparam> /// <param name="aggregate">The aggregate.</param> /// <param name="facets">The facets.</param> /// <returns> /// The fluent aggregate interface. /// </returns> public static IAggregateFluent <TNewResult> Facet <TResult, TNewResult>( this IAggregateFluent <TResult> aggregate, params AggregateFacet <TResult>[] facets) { Ensure.IsNotNull(aggregate, nameof(aggregate)); return(aggregate.AppendStage(PipelineStageDefinitionBuilder.Facet <TResult, TNewResult>(facets))); }
/// <summary> /// Appends a $facet stage to the pipeline. /// </summary> /// <typeparam name="TResult">The type of the result.</typeparam> /// <param name="aggregate">The aggregate.</param> /// <param name="facets">The facets.</param> /// <returns>The fluent aggregate interface.</returns> public static IAggregateFluent <AggregateFacetResults> Facet <TResult>( this IAggregateFluent <TResult> aggregate, IEnumerable <AggregateFacet <TResult> > facets) { Ensure.IsNotNull(aggregate, nameof(aggregate)); return(aggregate.AppendStage(PipelineStageDefinitionBuilder.Facet(facets))); }