Method OfType
OfType<TNewResult>(IBsonSerializer<TNewResult>)
Appends a match stage to the pipeline that matches derived documents and changes the result type to the derived type.
public abstract IAggregateFluent<TNewResult> OfType<TNewResult>(IBsonSerializer<TNewResult> newResultSerializer) where TNewResult : TResult
Parameters
newResultSerializer
IBsonSerializer<TNewResult>The new result serializer.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TNewResult
The type of the derived documents.