/* Copyright 2010-present MongoDB Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Bson.Serialization; namespace MongoDB.Driver { /// /// Base class for implementors of . /// /// The type of the document. public abstract class AggregateFluentBase : IOrderedAggregateFluent { /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] public virtual IMongoDatabase Database { get { throw new NotImplementedException(); } } /// public abstract AggregateOptions Options { get; } /// public abstract IList Stages { get; } /// public abstract IAggregateFluent AppendStage(PipelineStageDefinition stage); /// public abstract IAggregateFluent As(IBsonSerializer newResultSerializer); /// public virtual IAggregateFluent> Bucket( AggregateExpressionDefinition groupBy, IEnumerable boundaries, AggregateBucketOptions options = null) { throw new NotImplementedException(); } /// public virtual IAggregateFluent Bucket( AggregateExpressionDefinition groupBy, IEnumerable boundaries, ProjectionDefinition output, AggregateBucketOptions options = null) { throw new NotImplementedException(); } /// public virtual IAggregateFluent> BucketAuto( AggregateExpressionDefinition groupBy, int buckets, AggregateBucketAutoOptions options = null) { throw new NotImplementedException(); } /// public virtual IAggregateFluent BucketAuto( AggregateExpressionDefinition groupBy, int buckets, ProjectionDefinition output, AggregateBucketAutoOptions options = null) { throw new NotImplementedException(); } /// public virtual IAggregateFluent> ChangeStream(ChangeStreamStageOptions options = null) { throw new NotImplementedException(); // implemented by subclasses } /// public virtual IAggregateFluent Count() { throw new NotImplementedException(); } /// public virtual IAggregateFluent Facet( IEnumerable> facets, AggregateFacetOptions options = null) { throw new NotImplementedException(); } /// public virtual IAggregateFluent GraphLookup( IMongoCollection from, FieldDefinition connectFromField, FieldDefinition connectToField, AggregateExpressionDefinition startWith, FieldDefinition @as, FieldDefinition depthField, AggregateGraphLookupOptions options = null) where TAs : IEnumerable { throw new NotImplementedException(); } /// public abstract IAggregateFluent Group(ProjectionDefinition group); /// public abstract IAggregateFluent Limit(int limit); /// public virtual IAggregateFluent Lookup(string foreignCollectionName, FieldDefinition localField, FieldDefinition foreignField, FieldDefinition @as, AggregateLookupOptions options) { throw new NotImplementedException(); } /// public virtual IAggregateFluent Lookup( IMongoCollection foreignCollection, BsonDocument let, PipelineDefinition lookupPipeline, FieldDefinition @as, AggregateLookupOptions options = null) where TAs : IEnumerable { throw new NotImplementedException(); } /// public abstract IAggregateFluent Match(FilterDefinition filter); /// public abstract IAggregateFluent OfType(IBsonSerializer newResultSerializer) where TNewResult : TResult; /// public virtual IAsyncCursor Out(string collectionName, CancellationToken cancellationToken) { throw new NotImplementedException(); } /// public abstract Task> OutAsync(string collectionName, CancellationToken cancellationToken); /// public abstract IAggregateFluent Project(ProjectionDefinition projection); /// public virtual IAggregateFluent ReplaceRoot(AggregateExpressionDefinition newRoot) { throw new NotImplementedException(); } /// public abstract IAggregateFluent Skip(int skip); /// public abstract IAggregateFluent Sort(SortDefinition sort); /// public virtual IAggregateFluent> SortByCount(AggregateExpressionDefinition id) { throw new NotImplementedException(); } /// public virtual IOrderedAggregateFluent ThenBy(SortDefinition newSort) { throw new NotImplementedException(); } /// public abstract IAggregateFluent Unwind(FieldDefinition field, IBsonSerializer newResultSerializer); /// public virtual IAggregateFluent Unwind(FieldDefinition field, AggregateUnwindOptions options) { throw new NotImplementedException(); } /// public virtual IAsyncCursor ToCursor(CancellationToken cancellationToken) { throw new NotImplementedException(); } /// public abstract Task> ToCursorAsync(CancellationToken cancellationToken); } }