Class ProjectionDefinition<TSource, TProjection>
Base class for projections.
public abstract class ProjectionDefinition<TSource, TProjection>
Type Parameters
TSource
The type of the source.
TProjection
The type of the projection.
- Inheritance
-
ProjectionDefinition<TSource, TProjection>
- Derived
- Inherited Members
Methods
Render(IBsonSerializer<TSource>, IBsonSerializerRegistry)
Renders the projection to a RenderedProjectionDefinition<TProjection>.
public virtual RenderedProjectionDefinition<TProjection> Render(IBsonSerializer<TSource> sourceSerializer, IBsonSerializerRegistry serializerRegistry)
Parameters
sourceSerializer
IBsonSerializer<TSource>The source serializer.
serializerRegistry
IBsonSerializerRegistryThe serializer registry.
Returns
Render(IBsonSerializer<TSource>, IBsonSerializerRegistry, LinqProvider)
Renders the projection to a RenderedProjectionDefinition<TProjection>.
public abstract 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.
Returns
Operators
implicit operator ProjectionDefinition<TSource, TProjection>(BsonDocument)
Performs an implicit conversion from BsonDocument to ProjectionDefinition<TSource, TProjection>.
public static implicit operator ProjectionDefinition<TSource, TProjection>(BsonDocument document)
Parameters
document
BsonDocumentThe document.
Returns
- ProjectionDefinition<TSource, TProjection>
The result of the conversion.
implicit operator ProjectionDefinition<TSource, TProjection>(ProjectionDefinition<TSource>)
Performs an implicit conversion from ProjectionDefinition<TSource> to ProjectionDefinition<TSource, TProjection>.
public static implicit operator ProjectionDefinition<TSource, TProjection>(ProjectionDefinition<TSource> projection)
Parameters
projection
ProjectionDefinition<TSource>The projection.
Returns
- ProjectionDefinition<TSource, TProjection>
The result of the conversion.
implicit operator ProjectionDefinition<TSource, TProjection>(string)
Performs an implicit conversion from string to ProjectionDefinition<TSource, TProjection>.
public static implicit operator ProjectionDefinition<TSource, TProjection>(string json)
Parameters
json
stringThe JSON string.
Returns
- ProjectionDefinition<TSource, TProjection>
The result of the conversion.