Class FindOneAndDeleteOperation<TResult>
- Namespace
- MongoDB.Driver.Core.Operations
- Assembly
- MongoDB.Driver.Core.dll
Represents a find one and delete operation.
public class FindOneAndDeleteOperation<TResult> : FindAndModifyOperationBase<TResult>, IWriteOperation<TResult>, IRetryableWriteOperation<TResult>, IExecutableInRetryableWriteContext<TResult>
Type Parameters
TResult
The type of the result.
- Inheritance
-
FindAndModifyOperationBase<TResult>FindOneAndDeleteOperation<TResult>
- Implements
-
IWriteOperation<TResult>IRetryableWriteOperation<TResult>IExecutableInRetryableWriteContext<TResult>
- Inherited Members
- Extension Methods
Constructors
FindOneAndDeleteOperation(CollectionNamespace, BsonDocument, IBsonSerializer<TResult>, MessageEncoderSettings)
Initializes a new instance of the FindOneAndDeleteOperation<TResult> class.
public FindOneAndDeleteOperation(CollectionNamespace collectionNamespace, BsonDocument filter, IBsonSerializer<TResult> resultSerializer, MessageEncoderSettings messageEncoderSettings)
Parameters
collectionNamespace
CollectionNamespaceThe collection namespace.
filter
BsonDocumentThe filter.
resultSerializer
IBsonSerializer<TResult>The result serializer.
messageEncoderSettings
MessageEncoderSettingsThe message encoder settings.
Properties
Filter
Gets the filter.
public BsonDocument Filter { get; }
Property Value
- BsonDocument
The filter.
Hint
Gets or sets the hint.
public BsonValue Hint { get; set; }
Property Value
- BsonValue
The hint.
Let
Gets or sets the let document.
public BsonDocument Let { get; set; }
Property Value
- BsonDocument
The let document.
MaxTime
Gets or sets the maximum time the server should spend on this operation.
public TimeSpan? MaxTime { get; set; }
Property Value
- TimeSpan?
The maximum time the server should spend on this operation.
Projection
Gets or sets the projection.
public BsonDocument Projection { get; set; }
Property Value
- BsonDocument
The projection.
Sort
Gets or sets the sort specification.
public BsonDocument Sort { get; set; }
Property Value
- BsonDocument
The sort specification.
Methods
GetCommandValidator()
Gets the command validator.
protected override IElementNameValidator GetCommandValidator()
Returns
- IElementNameValidator
An element name validator for the command.