/* 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.Threading;
using System.Threading.Tasks;
using MongoDB.Bson.Serialization;
namespace MongoDB.Driver
{
///
/// Base class for implementors of .
///
/// The type of the document.
/// The type of the projection (same as TDocument if there is no projection).
public abstract class FindFluentBase : IOrderedFindFluent
{
///
public abstract FilterDefinition Filter { get; set; }
///
public abstract FindOptions Options { get; }
///
public abstract IFindFluent As(IBsonSerializer resultSerializer);
///
[Obsolete("Use CountDocuments instead.")]
public virtual long Count(CancellationToken cancellationToken = default(CancellationToken))
{
throw new NotImplementedException();
}
///
[Obsolete("Use CountDocumentsAsync instead.")]
public abstract Task CountAsync(CancellationToken cancellationToken = default(CancellationToken));
///
public virtual long CountDocuments(CancellationToken cancellationToken = default(CancellationToken))
{
throw new NotImplementedException();
}
///
public virtual Task CountDocumentsAsync(CancellationToken cancellationToken = default(CancellationToken))
{
throw new NotImplementedException();
}
///
public abstract IFindFluent Limit(int? limit);
///
public abstract IFindFluent Project(ProjectionDefinition projection);
///
public abstract IFindFluent Skip(int? skip);
///
public abstract IFindFluent Sort(SortDefinition sort);
///
public virtual IAsyncCursor ToCursor(CancellationToken cancellationToken)
{
throw new NotImplementedException();
}
///
public abstract Task> ToCursorAsync(CancellationToken cancellationToken);
}
}