Class SafeEnumerator<T>
Thread safe System.Collections.Generic.IEnumerator<> implementation.
Implements
System.IAsyncDisposable
System.Collections.Generic.IEnumerator<T>
System.Collections.IEnumerator
System.IDisposable
Inherited Members
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
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
System.IAsyncDisposable
System.Collections.Generic.IEnumerator<>
System.Collections.IEnumerator
System.IDisposable