public override Task <TResult> RunCommandAsync <TResult>(Command <TResult> command, ReadPreference readPreference = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(UsingImplicitSessionAsync(session => RunCommandAsync(session, command, readPreference, cancellationToken), cancellationToken));
 }
        public override Task <TResult> RunCommandAsync <TResult>(IClientSessionHandle session, Command <TResult> command, ReadPreference readPreference = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            Ensure.IsNotNull(session, nameof(session));
            Ensure.IsNotNull(command, nameof(command));
            readPreference = readPreference ?? ReadPreference.Primary;

            var operation = CreateRunCommandOperation(command);

            return(ExecuteReadOperationAsync(session, operation, readPreference, cancellationToken));
        }
 /// <inheritdoc />
 public abstract Task <TResult> RunCommandAsync <TResult>(Command <TResult> command, ReadPreference readPreference = null, CancellationToken cancellationToken = default(CancellationToken));