Class ConstantSetFieldDefinition<TDocument, TField>
A SetFieldDefinition that uses a field and a a constant to define the field to be set.
public sealed class ConstantSetFieldDefinition<TDocument, TField> : SetFieldDefinition<TDocument>
Type Parameters
TDocument
The type of the document.
TField
The type of the field.
- Inheritance
-
SetFieldDefinition<TDocument>ConstantSetFieldDefinition<TDocument, TField>
- Inherited Members
Constructors
ConstantSetFieldDefinition(FieldDefinition<TDocument, TField>, TField)
Initializes an instance of ConstantSetFieldDefinition.
public ConstantSetFieldDefinition(FieldDefinition<TDocument, TField> field, TField value)
Parameters
field
FieldDefinition<TDocument, TField>The field.
value
TFieldThe value.
Methods
Render(IBsonSerializer<TDocument>, IBsonSerializerRegistry, LinqProvider)
Renders the SetFieldDefinition.
public override BsonElement Render(IBsonSerializer<TDocument> documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)
Parameters
documentSerializer
IBsonSerializer<TDocument>The document serializer.
serializerRegistry
IBsonSerializerRegistryThe serializer registry.
linqProvider
LinqProviderThe linq provider.
Returns
- BsonElement
The rendered SetFieldDefinition.