Table of Contents

Interface DelayAction.IGroup<T>

Namespace
Ecng.Serialization
Assembly
Ecng.Serialization.dll

Represents a group of delayed actions with a specific group state.

public interface DelayAction.IGroup<T> : DelayAction.IGroup where T : IDisposable

Type Parameters

T

The type of the group state, which implements IDisposable.

Inherited Members
Extension Methods

Methods

Add(Action<T>, Action<Exception>, bool, bool)

Adds an action that receives the group state.

void Add(Action<T> action, Action<Exception> postAction = null, bool canBatch = true, bool breakBatchOnError = true)

Parameters

action Action<T>

The action to execute with the group state.

postAction Action<Exception>

An action to execute after the main action, with an exception parameter if an error occurred.

canBatch bool

Determines if the action can be batched.

breakBatchOnError bool

Determines if batching should break on error.

Add<TState>(Action<T, TState>, TState, Action<Exception>, bool, bool, Func<TState, TState, bool>)

Adds an action that receives the group state and an additional state parameter.

void Add<TState>(Action<T, TState> action, TState state, Action<Exception> postAction = null, bool canBatch = true, bool breakBatchOnError = true, Func<TState, TState, bool> compareStates = null)

Parameters

action Action<T, TState>

The action to execute with the group state and additional state.

state TState

The additional state for the action.

postAction Action<Exception>

An action to execute after the main action, with an exception parameter if an error occurred.

canBatch bool

Determines if the action can be batched.

breakBatchOnError bool

Determines if batching should break on error.

compareStates Func<TState, TState, bool>

A function to compare two state values for batching decisions.

Type Parameters

TState

The type of the additional state.