Interface 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)
Namespace: Libplanet.Blockchain.Renderers
Assembly: Libplanet.dll
Syntax
public interface IRenderer
Methods
| Improve this Doc View SourceRenderBlock(Block, Block)
Does things that should be done right after a new Block is appended to a BlockChain (so that its Tip has changed).
Declaration
void RenderBlock(Block oldTip, Block newTip)
Parameters
Type | Name | Description |
---|---|---|
Block | oldTip | The previous Tip. |
Block | newTip | The current Tip. |
Remarks
It is guaranteed to be called only once for a block, and only after applied to the blockchain, unless it has been stale due to reorg.