Show / Hide Table of Contents

Struct Lock.Scope

Represents acquired lock holder.

Implements
IDisposable
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: DotNext.Threading
Assembly: DotNext.dll
Syntax
public ref struct Lock.Scope : IDisposable
Remarks

The lock can be released by calling Dispose().

Properties

View Source

IsEmpty

Indicates that this object doesn't hold the lock.

Declaration
public readonly bool IsEmpty { get; }
Property Value
Type Description
bool

Methods

View Source

Dispose()

Releases the acquired lock.

Declaration
public void Dispose()
Remarks

This object is not reusable after calling of this method.

Operators

View Source

implicit operator bool(in Scope)

Indicates that the object holds successfully acquired lock.

Declaration
public static implicit operator bool(in Lock.Scope scope)
Parameters
Type Name Description
Lock.Scope scope

The lock holder.

Returns
Type Description
bool

true, if the object holds successfully acquired lock; otherwise, false.

Implements

IDisposable

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾