IChannelCommandAsyncTResult Method (DatabaseNamespace, BsonDocument, IElementNameValidator, FuncCommandResponseHandling, Boolean, IBsonSerializerTResult, MessageEncoderSettings, CancellationToken) |
Note: This API is now obsolete.
Executes a Command protocol.
Namespace:
MongoDB.Driver.Core.Bindings
Assembly:
MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.13.1-v2-13-x1+a7f8afe27855f38f4f72157d11ba2ae73895502e
Syntax [ObsoleteAttribute("Use the newest overload instead.")]
Task<TResult> CommandAsync<TResult>(
DatabaseNamespace databaseNamespace,
BsonDocument command,
IElementNameValidator commandValidator,
Func<CommandResponseHandling> responseHandling,
bool secondaryOk,
IBsonSerializer<TResult> resultSerializer,
MessageEncoderSettings messageEncoderSettings,
CancellationToken cancellationToken
)
<ObsoleteAttribute("Use the newest overload instead.")>
Function CommandAsync(Of TResult) (
databaseNamespace As DatabaseNamespace,
command As BsonDocument,
commandValidator As IElementNameValidator,
responseHandling As Func(Of CommandResponseHandling),
secondaryOk As Boolean,
resultSerializer As IBsonSerializer(Of TResult),
messageEncoderSettings As MessageEncoderSettings,
cancellationToken As CancellationToken
) As Task(Of TResult)
[<ObsoleteAttribute("Use the newest overload instead.")>]
abstract CommandAsync :
databaseNamespace : DatabaseNamespace *
command : BsonDocument *
commandValidator : IElementNameValidator *
responseHandling : Func<CommandResponseHandling> *
secondaryOk : bool *
resultSerializer : IBsonSerializer<'TResult> *
messageEncoderSettings : MessageEncoderSettings *
cancellationToken : CancellationToken -> Task<'TResult>
Parameters
- databaseNamespace
- Type: MongoDB.DriverDatabaseNamespace
The database namespace. - command
- Type: MongoDB.BsonBsonDocument
The command. - commandValidator
- Type: MongoDB.Bson.IOIElementNameValidator
The command validator. - responseHandling
- Type: SystemFuncCommandResponseHandling
The response handling. - secondaryOk
- Type: SystemBoolean
if set to true sets the SecondaryOk bit to true in the command message sent to the server. - resultSerializer
- Type: MongoDB.Bson.SerializationIBsonSerializerTResult
The result serializer. - messageEncoderSettings
- Type: MongoDB.Driver.Core.WireProtocol.Messages.EncodersMessageEncoderSettings
The message encoder settings. - cancellationToken
- Type: System.ThreadingCancellationToken
The cancellation token.
Type Parameters
- TResult
- The type of the result.
Return Value
Type:
TaskTResultA Task whose result is the result of the Command protocol.
See Also