C# Class Whathecode.System.Algorithm.Loop.OperationHook

Class which allows to hook operations into certain iterations of loop. TODO: Implement abstractly (generalized for other classes?) when there might be a need to.
Mostrar archivo Open project: Whathecode/NET-Core-Library-Extension

Public Methods

Method Description
AllButLast ( Action operation ) : void

Hook an operation at every iteration of the loop except the last.

DoActions ( LoopIteration currentIteration ) : void

Performs the actions for a given iteration, when available.

First ( Action operation ) : void

Hook an operation the first iteration of the loop.

OperationHook ( List iterationList ) : System

Create a new operation hook for a given loop.

Method Details

AllButLast() public method

Hook an operation at every iteration of the loop except the last.
public AllButLast ( Action operation ) : void
operation Action The operation to be executed.
return void

DoActions() public method

Performs the actions for a given iteration, when available.
public DoActions ( LoopIteration currentIteration ) : void
currentIteration LoopIteration The current iteration to do actions for.
return void

First() public method

Hook an operation the first iteration of the loop.
public First ( Action operation ) : void
operation Action The operation to be executed.
return void

OperationHook() public method

Create a new operation hook for a given loop.
public OperationHook ( List iterationList ) : System
iterationList List The list of iterations in which to hook.
return System