Photomechanics API
DisposableExtendedExtensions Class Reference

IAsyncDisposableExtended extensions. More...

Static Public Member Functions

static void ThrowIfDisposed (this IAsyncDisposableExtended obj)
 Throw ObjectDisposedException if API is disposed. More...
 
static async Task DisposeAsyncLogErrors (this IAsyncDisposableExtended asyncDisposable)
 DisposeAsync should never throw exceptions. However, bugs can happen, so in situation when there is no exception handling above DisposeAsync call we can at least log errors.
 
static void DisposeAsyncLogErrorsFireAndForget (this IAsyncDisposableExtended asyncDisposable)
 Starts DisposeAsyncLogErrors in a new task to make sure no deadlocks occur in complex disposal scenarios.
 

Detailed Description

Member Function Documentation

◆ ThrowIfDisposed()

static void DisposableExtendedExtensions.ThrowIfDisposed ( this IAsyncDisposableExtended  obj)
static

Throw ObjectDisposedException if API is disposed.

Exceptions
ObjectDisposedExceptionThrown when IAsyncDisposableExtended.IsDisposed is set tot true.