Class StringFieldDefinition<TDocument, TField>
A string based field name.
public sealed class StringFieldDefinition<TDocument, TField> : FieldDefinition<TDocument, TField>
Type Parameters
TDocument
The type of the document.
TField
The type of the field.
- Inheritance
-
FieldDefinition<TDocument, TField>StringFieldDefinition<TDocument, TField>
- Inherited Members
Constructors
StringFieldDefinition(string, IBsonSerializer<TField>)
Initializes a new instance of the StringFieldDefinition<TDocument, TField> class.
public StringFieldDefinition(string fieldName, IBsonSerializer<TField> fieldSerializer = null)
Parameters
fieldName
stringName of the field.
fieldSerializer
IBsonSerializer<TField>The field serializer.
Methods
Render(IBsonSerializer<TDocument>, IBsonSerializerRegistry, LinqProvider)
Renders the field to a RenderedFieldDefinition<TField>.
public override RenderedFieldDefinition<TField> Render(IBsonSerializer<TDocument> documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)
Parameters
documentSerializer
IBsonSerializer<TDocument>The document serializer.
serializerRegistry
IBsonSerializerRegistryThe serializer registry.
linqProvider
LinqProviderThe LINQ provider.
Returns
Render(IBsonSerializer<TDocument>, IBsonSerializerRegistry, LinqProvider, bool)
Renders the field to a RenderedFieldDefinition<TField>.
public override RenderedFieldDefinition<TField> Render(IBsonSerializer<TDocument> documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider, bool allowScalarValueForArrayField)
Parameters
documentSerializer
IBsonSerializer<TDocument>The document serializer.
serializerRegistry
IBsonSerializerRegistryThe serializer registry.
linqProvider
LinqProviderThe LINQ provider.
allowScalarValueForArrayField
boolWhether a scalar value is allowed for an array field.