Exemplo n.º 1
0
 private WriteConcernResult ExecuteProtocol(IChannelHandle channel, CancellationToken cancellationToken)
 {
     return(channel.Delete(
                _collectionNamespace,
                _request.Filter,
                _request.Limit != 1,
                _messageEncoderSettings,
                _writeConcern,
                cancellationToken));
 }
        // methods
        protected override WriteConcernResult ExecuteProtocol(IChannelHandle channel, WriteRequest request, CancellationToken cancellationToken)
        {
            var deleteRequest = (DeleteRequest)request;
            var isMulti = deleteRequest.Limit == 0;

            return channel.Delete(
               CollectionNamespace,
               deleteRequest.Filter,
               isMulti,
               MessageEncoderSettings,
               WriteConcern,
               cancellationToken);
        }
        // methods
        protected override WriteConcernResult ExecuteProtocol(IChannelHandle channel, WriteRequest request, CancellationToken cancellationToken)
        {
            var deleteRequest = (DeleteRequest)request;
            var isMulti       = deleteRequest.Limit == 0;

            return(channel.Delete(
                       CollectionNamespace,
                       deleteRequest.Filter,
                       isMulti,
                       MessageEncoderSettings,
                       WriteConcern,
                       cancellationToken));
        }
Exemplo n.º 4
0
        private WriteConcernResult ExecuteProtocol(IChannelHandle channel, CancellationToken cancellationToken)
        {
            if (_request.Collation != null)
            {
                throw new NotSupportedException("OP_DELETE does not support collations.");
            }

            return(channel.Delete(
                       _collectionNamespace,
                       _request.Filter,
                       _request.Limit != 1,
                       _messageEncoderSettings,
                       _writeConcern,
                       cancellationToken));
        }
Exemplo n.º 5
0
        // methods
        protected override WriteConcernResult ExecuteProtocol(IChannelHandle channel, DeleteRequest request, CancellationToken cancellationToken)
        {
            if (request.Collation != null)
            {
                throw new NotSupportedException("OP_DELETE does not support collations.");
            }
            var isMulti = request.Limit == 0;

            return(channel.Delete(
                       CollectionNamespace,
                       request.Filter,
                       isMulti,
                       MessageEncoderSettings,
                       WriteConcern,
                       cancellationToken));
        }
        // methods
        protected override WriteConcernResult ExecuteProtocol(IChannelHandle channel, WriteRequest request, CancellationToken cancellationToken)
        {
            var deleteRequest = (DeleteRequest)request;
            if (deleteRequest.Collation != null)
            {
                throw new NotSupportedException("OP_DELETE does not support collations.");
            }
            var isMulti = deleteRequest.Limit == 0;

            return channel.Delete(
               CollectionNamespace,
               deleteRequest.Filter,
               isMulti,
               MessageEncoderSettings,
               WriteConcern,
               cancellationToken);
        }