// constructors
 public DeleteOpcodeOperationEmulator(
     CollectionNamespace collectionNamespace,
     DeleteRequest request,
     MessageEncoderSettings messageEncoderSettings)
 {
     _collectionNamespace = Ensure.IsNotNull(collectionNamespace, "collectionNamespace");
     _request = Ensure.IsNotNull(request, "request");
     _messageEncoderSettings = messageEncoderSettings;
 }
        // methods
        public override async Task AbortAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            if (_aborted)
            {
                return;
            }
            ThrowIfClosedOrDisposed();
            _aborted = true;

            var chunksCollectionNamespace = _bucket.GetChunksCollectionNamespace();
            var filter = new BsonDocument("files_id", _id);
            var deleteRequest = new DeleteRequest(filter) { Limit = 0 };
            var requests = new WriteRequest[] { deleteRequest };
            var messageEncoderSettings = _bucket.GetMessageEncoderSettings();
            var operation = new BulkMixedWriteOperation(chunksCollectionNamespace, requests, messageEncoderSettings)
            {
                WriteConcern = _bucket.Options.WriteConcern
            };

            await operation.ExecuteAsync(_binding, cancellationToken).ConfigureAwait(false);
        }
 // private methods
 private BulkMixedWriteOperation CreateAbortOperation()
 {
     var chunksCollectionNamespace = _bucket.GetChunksCollectionNamespace();
     var filter = new BsonDocument("files_id", _id);
     var deleteRequest = new DeleteRequest(filter) { Limit = 0 };
     var requests = new WriteRequest[] { deleteRequest };
     var messageEncoderSettings = _bucket.GetMessageEncoderSettings();
     return new BulkMixedWriteOperation(chunksCollectionNamespace, requests, messageEncoderSettings)
     {
         WriteConcern = _bucket.Options.WriteConcern
     };
 }