コード例 #1
0
 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));
 }
コード例 #2
0
        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));
        }
コード例 #3
0
 /// <inheritdoc />
 public abstract Task <TResult> RunCommandAsync <TResult>(Command <TResult> command, ReadPreference readPreference = null, CancellationToken cancellationToken = default(CancellationToken));