public AggregateOperation WithResultMode(AggregateResultMode value) { return((ResultMode == value) ? this : new Builder(this) { _resultMode = value }.Build()); }
// constructors public Builder(AggregateOperation other) { _allowDiskUsage = other.AllowDiskUsage; _batchSize = other.BatchSize; _collectionName = other.CollectionName; _databaseName = other.DatabaseName; _resultMode = other.ResultMode; _pipeline = other.Pipeline; }
protected AggregateCursorOperationBase( bool?allowDiskUsage, int?batchSize, string collectionName, string databaseName, AggregateResultMode resultMode, IReadOnlyList <BsonDocument> pipeline) : base( allowDiskUsage, collectionName, databaseName, pipeline) { _batchSize = batchSize; _resultMode = resultMode; }
private AggregateOperation( bool?allowDiskUsage, int?batchSize, string collectionName, string databaseName, AggregateResultMode resultMode, IReadOnlyList <BsonDocument> pipeline) : base( allowDiskUsage, batchSize, collectionName, databaseName, resultMode, pipeline) { }
// constructors protected AggregateCursorOperationBase(string databaseName, string collectionName, IEnumerable <BsonDocument> pipeline) : base(databaseName, collectionName, pipeline) { _resultMode = AggregateResultMode.Cursor; }
// constructors protected AggregateCursorOperationBase(CollectionNamespace collectionNamespace, IEnumerable <BsonDocument> pipeline, MessageEncoderSettings messageEncoderSettings) : base(collectionNamespace, pipeline, messageEncoderSettings) { _resultMode = AggregateResultMode.Cursor; }
// constructors protected AggregateCursorOperationBase(CollectionNamespace collectionNamespace, IEnumerable<BsonDocument> pipeline, MessageEncoderSettings messageEncoderSettings) : base(collectionNamespace, pipeline, messageEncoderSettings) { _resultMode = AggregateResultMode.Cursor; }