Show / Hide Table of Contents

Class DoubleEnumerationGuard

Utility class which prevents double-enumeration for System.Collections.IEnumerable. Some enumerable may not allow double enumeration which leads to invalid state and may use this class for asserts. I.e. EnumerableSerializer creates enumerable for Steam. If double enumerated then Stream will return elements from current Stream read position which is invalid after first enumeration.

Inheritance
System.Object
DoubleEnumerationGuard
Implements
System.Collections.IEnumerable
Namespace: Eco.Core.Utils
Assembly: Eco.Core.dll
Syntax
public class DoubleEnumerationGuard : Object, IEnumerable

Constructors

DoubleEnumerationGuard(IEnumerable, String)

Declaration
public DoubleEnumerationGuard(IEnumerable enumerable, string message = "Double enumeration detected which isn't allowed for this enumerable.")
Parameters
Type Name Description
System.Collections.IEnumerable enumerable
System.String message

Methods

GetEnumerator()

Declaration
public IEnumerator GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.IEnumerable

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾