Namespace Libplanet.Blockchain.Renderers
Classes
AnonymousActionRenderer
An IActionRenderer that invokes its callbacks. In other words, this is an IActionRenderer version of AnonymousRenderer.
This class is useful when you want an one-use ad-hoc implementation (i.e., Java-style anonymous class) of IActionRenderer interface.
AnonymousRenderer
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 interface.
AtomicActionRenderer
A middleware to make action render events to satisfy transactions' atomicity.
Decorates an IActionRenderer instance and filters out render events made by unsuccessful transactions (i.e., transactions with one or more exception-throwing actions).
LoggedActionRenderer
Decorates an IActionRenderer so that all event messages are logged. In other words, this is an IActionRenderer version of LoggedRenderer.
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 Serilog.Events.LogEventLevel.Error (regardless of Level configuration).
LoggedRenderer
Decorates an IRenderer 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 Serilog.Events.LogEventLevel.Error (regardless of Level configuration).
Interfaces
IActionRenderer
Listens state changes of every step of actions, besides blocks, on a BlockChain. If you need more fine-grained events than IRenderer, implement this interface instead.
The invocation order of methods for each Block are:
- RenderBlock(Block, Block) (one time)
- RenderAction(IValue, IActionContext, IAccountStateDelta) & RenderActionError(IValue, IActionContext, Exception) (zero or more times)
- RenderBlockEnd(Block, Block) (one time)
IRenderer
Listens state changes on a BlockChain.
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 are:
- RenderBlock(Block, Block) (one time)