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
TThe 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
actionAction<T>The action to execute with the group state.
postActionAction<Exception>An action to execute after the main action, with an exception parameter if an error occurred.
canBatchboolDetermines if the action can be batched.
breakBatchOnErrorboolDetermines 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
actionAction<T, TState>The action to execute with the group state and additional state.
stateTStateThe additional state for the action.
postActionAction<Exception>An action to execute after the main action, with an exception parameter if an error occurred.
canBatchboolDetermines if the action can be batched.
breakBatchOnErrorboolDetermines if batching should break on error.
compareStatesFunc<TState, TState, bool>A function to compare two state values for batching decisions.
Type Parameters
TStateThe type of the additional state.