Method OfType
OfType<TInput, TOutput>(IBsonSerializer<TOutput>)
Create a $match stage that select documents of a sub type.
public static PipelineStageDefinition<TInput, TOutput> OfType<TInput, TOutput>(IBsonSerializer<TOutput> outputSerializer = null) where TOutput : TInput
Parameters
outputSerializer
IBsonSerializer<TOutput>The output serializer.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInput
The type of the input documents.
TOutput
The type of the output documents.