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