PostSharp 6.6 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects.​Internals.​State­Machine Namespace / Base­Generated­Iterator­State­Machine(TElement) Class / Base­Generated­Iterator­State­Machine(TElement) Methods

BaseGeneratedIteratorStateMachine<TElement> Methods

The BaseGeneratedIteratorStateMachine<TElement> generic type exposes the following members.

Methods
  NameDescription
Public methodCallTargetEnumerableMethod
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.
Public methodCallTargetEnumeratorMethod
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.
Public methodCreateCopy
Creates an enumerator from this enumerable as a copy of this instance. See Remarks.
Public methodDispose
Disposes the decorated enumerator and calls OnSuccess and OnExit, if OnEntry was called but OnExit wasn't yet called.
Public methodMoveNext
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.
Extension Methods
  NameDescription
Public Extension MethodToAdvisableCollection<TElement>
Converts an IEnumerable<T> into an AdvisableCollection<T>.
(Defined by Extensions.)
Public Extension MethodToAdvisableDictionary<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.)
Public Extension MethodToAdvisableHashSet<TElement>
Converts an IEnumerable<T> into an AdvisableHashSet<T>.
(Defined by Extensions.)
See Also