Partilhar via


AsyncReaderWriterResourceLock<TMoniker,TResource>.ResourceReleaser Struct

Definition

A value whose disposal releases a held lock.

public:  where TResource : classvalue class AsyncReaderWriterResourceLock<TMoniker, TResource>::ResourceReleaser : IDisposable
public:  where TResource : classvalue class AsyncReaderWriterResourceLock<TMoniker, TResource>::ResourceReleaser : IAsyncDisposable, IDisposable
[System.Diagnostics.DebuggerDisplay("{releaser.awaiter.kind}")]
public struct AsyncReaderWriterResourceLock<TMoniker,TResource>.ResourceReleaser : IDisposable where TResource : class
[System.Diagnostics.DebuggerDisplay("{releaser.awaiter.kind}")]
[System.Runtime.CompilerServices.IsReadOnly]
public readonly struct AsyncReaderWriterResourceLock<TMoniker,TResource>.ResourceReleaser : IAsyncDisposable, IDisposable where TResource : class
[<System.Diagnostics.DebuggerDisplay("{releaser.awaiter.kind}")>]
type AsyncReaderWriterResourceLock<'Moniker, 'Resource (requires 'Resource : null)>.ResourceReleaser = struct
    interface IDisposable
[<System.Diagnostics.DebuggerDisplay("{releaser.awaiter.kind}")>]
[<System.Runtime.CompilerServices.IsReadOnly>]
type AsyncReaderWriterResourceLock<'Moniker, 'Resource (requires 'Resource : null)>.ResourceReleaser = struct
    interface IDisposable
    interface IAsyncDisposable
Public Structure AsyncReaderWriterResourceLock(Of TMoniker, TResource).ResourceReleaser
Implements IDisposable
Public Structure AsyncReaderWriterResourceLock(Of TMoniker, TResource).ResourceReleaser
Implements IAsyncDisposable, IDisposable

Type Parameters

TMoniker
TResource
Inheritance
AsyncReaderWriterResourceLock<TMoniker,TResource>.ResourceReleaser
Attributes
Implements

Methods

Dispose()

Releases the lock.

DisposeAsync()

Releases the lock.

GetResourceAsync(TMoniker, CancellationToken)

Gets the lock protected resource.

ReleaseAsync()

Asynchronously releases the lock. Dispose should still be called after this.

Applies to

Thread Safety

This type is thread-safe for all members.