protected override Task<WriteConcernResult> ExecuteProtocolAsync(IChannelHandle channel, WriteRequest request, CancellationToken cancellationToken) { var deleteRequest = (DeleteRequest)request; var isMulti = deleteRequest.Limit == 0; return channel.DeleteAsync( CollectionNamespace, deleteRequest.Filter, isMulti, MessageEncoderSettings, WriteConcern, cancellationToken); }
protected override Task<WriteConcernResult> ExecuteProtocolAsync(IChannelHandle channel, WriteRequest request, CancellationToken cancellationToken) { var deleteRequest = (DeleteRequest)request; var isMulti = deleteRequest.Limit == 0; if (deleteRequest.Collation != null) { throw new NotSupportedException("OP_DELETE does not support collations."); } return channel.DeleteAsync( CollectionNamespace, deleteRequest.Filter, isMulti, MessageEncoderSettings, WriteConcern, cancellationToken); }
protected override Task <WriteConcernResult> ExecuteProtocolAsync(IChannelHandle channel, WriteRequest request, CancellationToken cancellationToken) { var deleteRequest = (DeleteRequest)request; var isMulti = deleteRequest.Limit == 0; if (deleteRequest.Collation != null) { throw new NotSupportedException("OP_DELETE does not support collations."); } return(channel.DeleteAsync( CollectionNamespace, deleteRequest.Filter, isMulti, MessageEncoderSettings, WriteConcern, cancellationToken)); }
private Task <WriteConcernResult> ExecuteProtocolAsync(IChannelHandle channel, CancellationToken cancellationToken) { if (_request.Collation != null) { throw new NotSupportedException("OP_DELETE does not support collations."); } if (_request.Hint != null) { throw new NotSupportedException("OP_DELETE does not support hints."); } return(channel.DeleteAsync( _collectionNamespace, _request.Filter, _request.Limit != 1, _messageEncoderSettings, _writeConcern, cancellationToken)); }