Class TemporaryTableDisposer

Namespace
RentADeveloper.DbConnectionPlus.DatabaseAdapters
Assembly
RentADeveloper.DbConnectionPlus.dll

Handles the disposal of a temporary database table. When disposed, drops the temporary table.

public sealed class TemporaryTableDisposer : IDisposable, IAsyncDisposable
Inheritance
TemporaryTableDisposer
Implements
Inherited Members

Constructors

TemporaryTableDisposer(Action, Func<ValueTask>)

Initializes a new instance of the TemporaryTableDisposer class.

public TemporaryTableDisposer(Action dropTableFunction, Func<ValueTask> dropTableAsyncFunction)

Parameters

dropTableFunction Action

The function that drops the table.

dropTableAsyncFunction Func<ValueTask>

The function that asynchronously drops the table.

Exceptions

ArgumentNullException
  • dropTableFunction is null.
  • dropTableAsyncFunction is null.

Methods

Dispose()

Drops the temporary table.

public void Dispose()

DisposeAsync()

Asynchronously drops the temporary table.

public ValueTask DisposeAsync()

Returns

ValueTask

A task that represents the asynchronous operation.