Show / Hide Table of Contents

Interface IRenderer

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 are:

  1. RenderBlock(Block, Block) (one time)
Namespace: Libplanet.Blockchain.Renderers
Assembly: Libplanet.dll
Syntax
public interface IRenderer

Methods

| Improve this Doc View Source

RenderBlock(Block, Block)

Does things that should be done right after a new Block is appended to a BlockChain<T> (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.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium