Class JsonProjectionDefinition<TSource, TProjection>
A JSON string based projection.
public sealed class JsonProjectionDefinition<TSource, TProjection> : ProjectionDefinition<TSource, TProjection>
Type Parameters
TSource
The type of the source.
TProjection
The type of the projection.
- Inheritance
-
ProjectionDefinition<TSource, TProjection>JsonProjectionDefinition<TSource, TProjection>
- Inherited Members
Constructors
JsonProjectionDefinition(string, IBsonSerializer<TProjection>)
Initializes a new instance of the BsonDocumentSortDefinition<TDocument> class.
public JsonProjectionDefinition(string json, IBsonSerializer<TProjection> projectionSerializer = null)
Parameters
json
stringThe json.
projectionSerializer
IBsonSerializer<TProjection>The projection serializer.
Properties
Json
Gets the json.
public string Json { get; }
Property Value
ProjectionSerializer
Gets the projection serializer.
public IBsonSerializer<TProjection> ProjectionSerializer { get; }
Property Value
- IBsonSerializer<TProjection>
Methods
Render(IBsonSerializer<TSource>, IBsonSerializerRegistry, LinqProvider)
Renders the projection to a RenderedProjectionDefinition<TProjection>.
public override RenderedProjectionDefinition<TProjection> Render(IBsonSerializer<TSource> sourceSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)
Parameters
sourceSerializer
IBsonSerializer<TSource>The source serializer.
serializerRegistry
IBsonSerializerRegistryThe serializer registry.
linqProvider
LinqProviderThe LINQ provider.