Namespace Libplanet.Blockchain.Renderers
Classes
AnonymousActionRenderer<T>
An IActionRenderer<T> that invokes its callbacks. In other words, this is an IActionRenderer<T> version of AnonymousRenderer<T>.
This class is useful when you want an one-use ad-hoc implementation (i.e., Java-style anonymous class) of IActionRenderer<T> interface.
AnonymousRenderer<T>
A renderer that invokes its callbacks.
This class is useful when you want an one-use ad-hoc implementation (i.e., Java-style anonymous class) of IRenderer<T> interface.
DelayedActionRenderer<T>
An IActionRenderer<T> version of DelayedRenderer<T>.
Decorates an IActionRenderer<T> instance and delays the events until blocks are confirmed the certain number of blocks. When blocks are recognized the delayed events relevant to these blocks are relayed to the decorated IActionRenderer<T>.
DelayedRenderer<T>
Decorates an IRenderer<T> instance and delays the events until blocks are confirmed the certain number of blocks. When blocks are recognized the delayed events relevant to these blocks are relayed to the decorated IRenderer<T>.
LoggedActionRenderer<T>
Decorates an IActionRenderer<T> so that all event messages are logged. In other words, this is an IActionRenderer<T> version of LoggedRenderer<T>.
Every single event message causes two log messages: one is logged before
rendering, and other one is logged after rendering. If any exception is thrown
it is also logged with the log level
LoggedRenderer<T>
Decorates an IRenderer<T> so that all event messages are logged.
Every single event message causes two log messages: one is logged before
rendering, and other one is logged after rendering. If any exception is thrown
it is also logged with the log level
Interfaces
IActionRenderer<T>
Listens state changes of every step of actions, besides blocks, on a BlockChain<T>. If you need more fine-grained events than IRenderer<T>, implement this interface instead.
The invocation order of methods for each Block<T> are:
- RenderReorg(Block<T>, Block<T>, Block<T>) (one time)
- UnrenderAction(IAction, IActionContext, IAccountStateDelta) & UnrenderActionError(IAction, IActionContext, Exception) (zero or more times)
- RenderBlock(Block<T>, Block<T>) (one time)
- RenderAction(IAction, IActionContext, IAccountStateDelta) & RenderActionError(IAction, IActionContext, Exception) (zero or more times)
- RenderBlockEnd(Block<T>, Block<T>) (one time)
- RenderReorgEnd(Block<T>, Block<T>, Block<T>) (one time)
IRenderer<T>
Listens state changes on a BlockChain<T>.
Usually, implementations of this interface purpose to update the in-memory game states (if exist), or send a signal to the UI thread (usually the main thread) so that the graphics on the display is redrawn.
The invocation order of methods for each Block<T> are:
- RenderReorg(Block<T>, Block<T>, Block<T>) (one time)
- RenderBlock(Block<T>, Block<T>) (one time)
- RenderReorgEnd(Block<T>, Block<T>, Block<T>) (one time)