Click or drag to resize

ProjectionDefinitionBuilder<TSource> Class

A builder for a projection.
Inheritance Hierarchy
System.Object
  MongoDB.Driver.ProjectionDefinitionBuilder<TSource>

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public sealed class ProjectionDefinitionBuilder<TSource>

Type Parameters

TSource
The type of the source.

The ProjectionDefinitionBuilder<TSource> type exposes the following members.

Constructors
  NameDescription
Public methodProjectionDefinitionBuilder<TSource>
Initializes a new instance of the ProjectionDefinitionBuilder<TSource> class
Top
Methods
  NameDescription
Public methodAs<TProjection>
Creates a client side projection that is implemented solely by using a different serializer.
Public methodCombine(ProjectionDefinition<TSource>[])
Combines the specified projections.
Public methodCombine(IEnumerable<ProjectionDefinition<TSource>>)
Combines the specified projections.
Public methodElemMatch<TItem>(Expression<Func<TSource, IEnumerable<TItem>>>, FilterDefinition<TItem>)
Creates a projection that filters the contents of an array.
Public methodElemMatch<TItem>(Expression<Func<TSource, IEnumerable<TItem>>>, Expression<Func<TItem, Boolean>>)
Creates a projection that filters the contents of an array.
Public methodElemMatch<TItem>(FieldDefinition<TSource>, FilterDefinition<TItem>)
Creates a projection that filters the contents of an array.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExclude(Expression<Func<TSource, Object>>)
Creates a projection that excludes a field.
Public methodExclude(FieldDefinition<TSource>)
Creates a projection that excludes a field.
Public methodExpression<TProjection>
Creates a projection based on the expression.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInclude(Expression<Func<TSource, Object>>)
Creates a projection that includes a field.
Public methodInclude(FieldDefinition<TSource>)
Creates a projection that includes a field.
Public methodMeta
Creates a meta projection.
Public methodMetaSearchHighlights
Creates a search highlights projection.
Public methodMetaSearchScore
Creates a search score projection.
Public methodMetaSearchScoreDetails
Creates a search score details projection.
Public methodMetaTextScore
Creates a text score projection.
Public methodSearchMeta(Expression<Func<TSource, Object>>)
Creates a search metadata projection.
Public methodSearchMeta(FieldDefinition<TSource>)
Creates a search metadata projection.
Public methodSlice(Expression<Func<TSource, Object>>, Int32, Nullable<Int32>)
Creates an array slice projection.
Public methodSlice(FieldDefinition<TSource>, Int32, Nullable<Int32>)
Creates an array slice projection.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also