Table of Contents

Class FixedCountBatchableSourceSerializer<TItem>

Namespace
MongoDB.Driver.Core.Misc
Assembly
MongoDB.Driver.Core.dll

A serializer for BatchableSource that serializes a fixed count of items.

public class FixedCountBatchableSourceSerializer<TItem> : SerializerBase<BatchableSource<TItem>>, IBsonSerializer<BatchableSource<TItem>>, IBsonSerializer

Type Parameters

TItem

The type of the items.

Inheritance
FixedCountBatchableSourceSerializer<TItem>
Implements
Inherited Members

Constructors

FixedCountBatchableSourceSerializer(IBsonSerializer<TItem>, IElementNameValidator, int)

Initializes a new instance of the FixedCountBatchableSourceSerializer<TItem> class.

public FixedCountBatchableSourceSerializer(IBsonSerializer<TItem> itemSerializer, IElementNameValidator itemElementNameValidator, int count)

Parameters

itemSerializer IBsonSerializer<TItem>

The item serializer.

itemElementNameValidator IElementNameValidator

The item element name validator.

count int

The count.

Methods

Serialize(BsonSerializationContext, BsonSerializationArgs, BatchableSource<TItem>)

Serializes a value.

public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, BatchableSource<TItem> value)

Parameters

context BsonSerializationContext

The serialization context.

args BsonSerializationArgs

The serialization args.

value BatchableSource<TItem>

The value.