Npgsql.NpgsqlCommandBuilder.DeriveParameters C# (CSharp) Method

DeriveParameters() public static method

This method is reponsible to derive the command parameter list with values obtained from function definition. It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown. Parameters name will be parameter1, parameter2, ...
public static DeriveParameters ( NpgsqlCommand command ) : void
command NpgsqlCommand NpgsqlCommand whose function parameters will be obtained.
return void
        public static void DeriveParameters(NpgsqlCommand command)
        {
            try
            {
                DoDeriveParameters(command);
            }
            catch
            {
                command.Parameters.Clear();
                throw;
            }
        }