A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://dotnet.github.io/dotNext/api/DotNext.Disposable.html below:

Class Disposable | .NEXT

Class Disposable

Provides implementation of dispose pattern.

Namespace: DotNext Assembly: DotNext.dll Syntax
public abstract class Disposable : IDisposable
Properties | Edit this page View Source DisposedTask

Gets a task representing ObjectDisposedException exception.

Declaration
protected Task DisposedTask { get; }
Property Value | Edit this page View Source IsDisposed

Indicates that this object is disposed.

Declaration
protected bool IsDisposed { get; }
Property Value | Edit this page View Source IsDisposing

Indicates that DisposeAsync() is called but not yet completed.

Declaration
protected bool IsDisposing { get; }
Property Value | Edit this page View Source IsDisposingOrDisposed

Indicates that DisposeAsync() is called.

Declaration
protected bool IsDisposingOrDisposed { get; }
Property Value Methods | Edit this page View Source CreateException()

Creates a new instance of ObjectDisposedException class.

Declaration
protected ObjectDisposedException CreateException()
Returns | Edit this page View Source Dispose()

Releases all resources associated with this object.

Declaration | Edit this page View Source Dispose(bool)

Releases managed and unmanaged resources associated with this object.

Declaration
protected virtual void Dispose(bool disposing)
Parameters | Edit this page View Source Dispose(IEnumerable<IDisposable?>)

Disposes many objects.

Declaration
public static void Dispose(IEnumerable<IDisposable?> objects)
Parameters | Edit this page View Source DisposeAsync()

Releases managed resources associated with this object asynchronously.

Declaration
protected ValueTask DisposeAsync()
Returns Type Description ValueTask

The task representing asynchronous execution of this method.

| Edit this page View Source DisposeAsync(IEnumerable<IAsyncDisposable?>)

Disposes many objects.

Declaration
public static ValueTask DisposeAsync(IEnumerable<IAsyncDisposable?> objects)
Parameters Returns Type Description ValueTask

The task representing asynchronous execution of this method.

| Edit this page View Source DisposeAsync(params IAsyncDisposable?[])

Disposes many objects in safe manner.

Declaration
public static ValueTask DisposeAsync(params IAsyncDisposable?[] objects)
Parameters Type Name Description IAsyncDisposable[] objects

An array of objects to dispose.

Returns Type Description ValueTask

The task representing asynchronous execution of this method.

| Edit this page View Source DisposeAsyncCore()

Releases managed resources associated with this object asynchronously.

Declaration
protected virtual ValueTask DisposeAsyncCore()
Returns Type Description ValueTask

The task representing asynchronous execution of this method.

| Edit this page View Source Dispose<T>(ReadOnlySpan<T>)

Disposes many objects in safe manner.

Declaration
public static void Dispose<T>(ReadOnlySpan<T> objects) where T : IDisposable?
Parameters Type Name Description ReadOnlySpan<T> objects

An array of objects to dispose.

Type Parameters | Edit this page View Source ~Disposable()

Finalizes this object.

Declaration | Edit this page View Source GetDisposedTask<T>()

Returns a task representing ObjectDisposedException exception.

Declaration
protected Task<T> GetDisposedTask<T>()
Returns Type Parameters Name Description T

The type of the task.

| Edit this page View Source TryBeginDispose()

Starts disposing this object.

Declaration
protected bool TryBeginDispose()
Returns Type Description bool

true if cleanup operations can be performed; false if the object is already disposing.

| Edit this page View Source TrySetDisposedException(TaskCompletionSource)

Attempts to complete the task with ObjectDisposedException exception.

Declaration
protected bool TrySetDisposedException(TaskCompletionSource source)
Parameters Returns Type Description bool

true if operation was successful; otherwise, false.

| Edit this page View Source TrySetDisposedException<T>(TaskCompletionSource<T>)

Attempts to complete the task with ObjectDisposedException exception.

Declaration
protected bool TrySetDisposedException<T>(TaskCompletionSource<T> source)
Parameters Returns Type Description bool

true if operation was successful; otherwise, false.

Type Parameters Name Description T

The type of the task.

Implements Extension Methods See Also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4