Open sandboxFocus

Class RunTimeAspectHelper

Defines helper methods used by code transformed by aspects.

Inheritance
RunTimeAspectHelper
Namespace: Metalama.Framework.RunTime
Assembly: Metalama.Framework.dll
Syntax
public static class RunTimeAspectHelper

Methods

Name Description
Buffer(IEnumerable)

Evaluates an IEnumerable and stores the result into a List<object>. If the enumerable is already a list, returns the input list. The intended side effect of this method is to completely evaluate the input enumerable.

Buffer(IEnumerator)

Evaluates an IEnumerator, stores the result into a List<object?> and returns a resettable enumerator for this list. If the enumerator is already buffered, resets it and returns the same instance. The intended side effect of this method is to completely evaluate the input enumerator.

BufferAsync<T>(IAsyncEnumerable<T>, CancellationToken)
BufferAsync<T>(IAsyncEnumerator<T>, CancellationToken)
BufferToListAsync<T>(IAsyncEnumerator<T>, CancellationToken)
Buffer<T>(IEnumerable<T>)

Evaluates an IEnumerable<T> and stores the result into a List<T>. If the enumerable is already a list, returns the input list. The intended side effect of this method is to completely evaluate the input enumerable.

Buffer<T>(IEnumerator<T>)

Evaluates an IEnumerator<T>, stores the result into a List<T> and returns a resettable enumerator for this list. If the enumerator is already buffered, resets it and returns the same instance. The intended side effect of this method is to completely evaluate the input enumerator.