Table of Contents

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

connection SqlConnection

An open connection to run the lookup on.

procedure string

The procedure name as given to the command.

cancellationToken CancellationToken

The 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.