Method GetProcedureParameterNamesAsync
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.MSSqlClient.dll
GetProcedureParameterNamesAsync(SqlConnection, string, CancellationToken)
Asynchronously gets the parameter names a stored procedure declares by reading sys.all_parameters.
protected override ValueTask<ImmutableArray<string>> GetProcedureParameterNamesAsync(SqlConnection connection, string procedure, CancellationToken cancellationToken)
Parameters
connectionSqlConnectionAn open connection to run the lookup on.
procedurestringThe procedure name as given to the command.
cancellationTokenCancellationTokenThe cancellation token of the call: the command's cancellation token, together with the one passed to the terminal (for example
ToListAsync(token)) when there is one.
Returns
- ValueTask<ImmutableArray<string>>
The names as the provider reports them, or an empty or default array when they are not known.
Remarks
The failure of the lookup is annotated as in GetProcedureParameterNames(SqlConnection, string), unless it is an OperationCanceledException or cancellationToken has been canceled.