C# Class MongoDB.Driver.Builders.FieldsBuilder

Inheritance: BuilderBase
Exibir arquivo Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Public Methods

Method Description
Exclude ( ) : FieldsBuilder

Adds one or more field names to be excluded from the results.

FieldsBuilder ( ) : System

Initializes a new instance of the FieldsBuilder class.

Include ( ) : FieldsBuilder

Adds one or more field names to be included in the results.

Slice ( string name, int size ) : FieldsBuilder

Adds a slice to be included in the results.

Slice ( string name, int skip, int limit ) : FieldsBuilder

Adds a slice to be included in the results.

ToBsonDocument ( ) : BsonDocument

Returns the result of the builder as a BsonDocument.

Protected Methods

Method Description
Serialize ( BsonWriter bsonWriter, Type nominalType, IBsonSerializationOptions options ) : void

Serializes the result of the builder to a BsonWriter.

Method Details

Exclude() public method

Adds one or more field names to be excluded from the results.
public Exclude ( ) : FieldsBuilder
return FieldsBuilder

FieldsBuilder() public method

Initializes a new instance of the FieldsBuilder class.
public FieldsBuilder ( ) : System
return System

Include() public method

Adds one or more field names to be included in the results.
public Include ( ) : FieldsBuilder
return FieldsBuilder

Serialize() protected method

Serializes the result of the builder to a BsonWriter.
protected Serialize ( BsonWriter bsonWriter, Type nominalType, IBsonSerializationOptions options ) : void
bsonWriter BsonWriter The writer.
nominalType System.Type The nominal type.
options IBsonSerializationOptions The serialization options.
return void

Slice() public method

Adds a slice to be included in the results.
public Slice ( string name, int size ) : FieldsBuilder
name string The name of the field to slice.
size int The size of the slice (negative sizes are taken from the end).
return FieldsBuilder

Slice() public method

Adds a slice to be included in the results.
public Slice ( string name, int skip, int limit ) : FieldsBuilder
name string The name of the field to slice.
skip int The number of values to skip.
limit int The number of values to extract.
return FieldsBuilder

ToBsonDocument() public method

Returns the result of the builder as a BsonDocument.
public ToBsonDocument ( ) : BsonDocument
return BsonDocument