BaseGeneratedIteratorStateMachine<TElement> Class |
Namespace: PostSharp.Aspects.Internals.StateMachine
Assembly: PostSharp (in PostSharp.dll) Version: 6.5.19.0 (6.5.19.0)
public abstract class BaseGeneratedIteratorStateMachine<TElement> : IEnumerator<TElement>, IDisposable, IEnumerator, IEnumerable<TElement>, IEnumerable
Type Parameters
- TElement
- Type of elements of the enumerator or enumerable. If it's a non-generic enumerator or enumerable, then this is Object.
The BaseGeneratedIteratorStateMachine<TElement> type exposes the following members.
Name | Description | |
---|---|---|
BaseGeneratedIteratorStateMachine<TElement> | Initializes a new instance of the BaseGeneratedIteratorStateMachine<TElement> class |
Name | Description | |
---|---|---|
CallTargetEnumerableMethod |
Calls the target method, possibly with some arguments changed. This method is only overridden if the target method has IEnumerable
or IEnumerable<T> as the return type.
| |
CallTargetEnumeratorMethod |
Calls the target method, possibly with some arguments changed. This method is only overridden if the target method has IEnumerator
or IEnumerator<T> as the return type.
| |
CreateCopy |
Creates an enumerator from this enumerable as a copy of this instance. See Remarks.
| |
Dispose |
Disposes the decorated enumerator and calls OnSuccess and OnExit, if OnEntry was called but OnExit wasn't yet called.
| |
MoveNext |
Advances this (as an enumerator) to the next element by calling MoveNext() on the decorated enumerator, then accesses its Current
and stores it, so that it can be read and modified by OnYield(MethodExecutionArgs) advices.
|
Name | Description | |
---|---|---|
ToAdvisableCollection<TElement> |
Converts an IEnumerable<T> into an AdvisableCollection<T>.
(Defined by Extensions.) | |
ToAdvisableDictionary<TElement, TKey, TValue> |
Converts an IEnumerable<T> into a AdvisableDictionary<TKey, TValue> given a method returning the item key and a method returning the item value.
(Defined by Extensions.) | |
ToAdvisableHashSet<TElement> |
Converts an IEnumerable<T> into an AdvisableHashSet<T>.
(Defined by Extensions.) |
This class always uses the non-generic enumerable and the non-generic enumerator because it works for non-generic enumerables and pretty much all generic enumerables have the same methods implementing both the generic and the non-generic interfaces.