Class SafeEnumerator<T>

Thread safe System.Collections.Generic.IEnumerator<> implementation.

Inheritance
System.Object
Disposable
SafeEnumerator<T>
Implements
IDisposableEx
System.IAsyncDisposable
System.Collections.Generic.IEnumerator<T>
System.Collections.IEnumerator
System.IDisposable
Inherited Members
Disposable.AsyncDispose()
Disposable.CheckNotDisposed()
Disposable.Dispose()
Disposable.DisposeAsync()
Disposable.Disposed
Disposable.Disposing
Namespace: Solti.Utils.Primitives.Threading
Assembly: Solti.Utils.Primitives.dll
Syntax
public sealed class SafeEnumerator<T> : Disposable, IDisposableEx
Type Parameters
Name Description
T

Constructors

SafeEnumerator(IEnumerable<T>, ReaderWriterLockSlim)

Creates a new SafeEnumerator<T> instane.

Declaration
public SafeEnumerator(IEnumerable<T> src, ReaderWriterLockSlim lock)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> src
System.Threading.ReaderWriterLockSlim lock

Properties

Current

See System.Collections.Generic.IEnumerator`1.Current.

Declaration
public T Current { get; }
Property Value
Type Description
T

Methods

Dispose(Boolean)

Disposes this instance.

Declaration
protected override void Dispose(bool disposeManaged)
Parameters
Type Name Description
System.Boolean disposeManaged
Overrides
Disposable.Dispose(Boolean)

MoveNext()

See System.Collections.IEnumerator.MoveNext.

Declaration
public bool MoveNext()
Returns
Type Description
System.Boolean

Reset()

See System.Collections.IEnumerator.Reset.

Declaration
public void Reset()

Implements

IDisposableEx
System.IAsyncDisposable
System.Collections.Generic.IEnumerator<>
System.Collections.IEnumerator
System.IDisposable
In This Article
Back to top Generated by DocFX