Show / Hide Table of Contents

Class PoolableListEnumerator<T>

This allows to iterate through list with return to the pool after end. Uesfull for iterations over not-thread-safe collections in multithread environment. It will create a copy of collection by using lock and pooled list and it will automaticly return the list after Dispose is called.

Inheritance
System.Object
PoolableListEnumerator<T>
Implements
System.Collections.Generic.IEnumerator<T>
System.Collections.IEnumerator
System.IDisposable
Namespace: Eco.Shared.Utils
Assembly: Eco.Shared.dll
Syntax
public sealed class PoolableListEnumerator<T> : ValueType, IEnumerator<T>, IEnumerator, IDisposable
Type Parameters
Name Description
T

Properties

Current

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

Methods

Create<TContext, TContext2, TContext3>(TContext, TContext2, TContext3, Action<TContext, TContext2, TContext3, PoolableListWrapper<T>>)

Declaration
public static PoolableListEnumerator<T> Create<TContext, TContext2, TContext3>(TContext context, TContext2 context2, TContext3 context3, Action<TContext, TContext2, TContext3, PoolableListWrapper<T>> listBuilder)
Parameters
Type Name Description
TContext context
TContext2 context2
TContext3 context3
System.Action<TContext, TContext2, TContext3, PoolableListWrapper<T>> listBuilder
Returns
Type Description
PoolableListEnumerator<T>
Type Parameters
Name Description
TContext
TContext2
TContext3

Dispose()

Declaration
public void Dispose()

MoveNext()

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

Reset()

Declaration
public void Reset()

Implements

System.Collections.Generic.IEnumerator<>
System.Collections.IEnumerator
System.IDisposable

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾