Class DelayedActionRenderer<T>
Inheritance
DelayedActionRenderer<T>
Assembly: Libplanet.dll
Syntax
public class DelayedActionRenderer<T> : DelayedRenderer<T>, IActionRenderer<T>, IRenderer<T> where T : IAction, new()
Type Parameters
Examples
IStore store = GetStore();
IActionRenderer<ExampleAction> actionRenderer = new SomeActionRenderer();
// Wraps the actionRenderer with DelayedActionRenderer; the SomeActionRenderer instance
// becomes to receive event messages only after the relevent blocks are confirmed
// by 3+ blocks.
actionRenderer = new DelayedActionRenderer<ExampleAction>(
actionRenderer,
store,
confirmations: 3);
// You must pass the same store to the BlockChain<T>() constructor:
var chain = new BlockChain<ExampleAction>(
...,
store: store,
renderers: new[] { actionRenderer });
Constructors
|
Improve this Doc
View Source
DelayedActionRenderer(IActionRenderer<T>, IStore, Int32)
Declaration
public DelayedActionRenderer(IActionRenderer<T> renderer, IStore store, int confirmations)
Parameters
Type |
Name |
Description |
IActionRenderer<T> |
renderer |
The renderer to decorate which has the actual
implementations and receives delayed events.
|
IStore |
store |
The same store to what BlockChain<T> uses.
|
Int32 |
confirmations |
The required number of confirmations to recognize a block.
See also the Confirmations property.
|
Properties
|
Improve this Doc
View Source
ActionRenderer
The inner action renderer which has the actual implementations and receives
delayed events.
Declaration
public IActionRenderer<T> ActionRenderer { get; }
Property Value
Methods
|
Improve this Doc
View Source
OnTipChanged(Block<T>, Block<T>, Block<T>)
Declaration
protected override void OnTipChanged(Block<T> oldTip, Block<T> newTip, Block<T> branchpoint)
Parameters
Overrides
Libplanet.Blockchain.Renderers.DelayedRenderer<T>.OnTipChanged(Libplanet.Blocks.Block<T>, Libplanet.Blocks.Block<T>, Libplanet.Blocks.Block<T>)
|
Improve this Doc
View Source
RenderAction(IAction, IActionContext, IAccountStateDelta)
Declaration
public void RenderAction(IAction action, IActionContext context, IAccountStateDelta nextStates)
Parameters
|
Improve this Doc
View Source
RenderActionError(IAction, IActionContext, Exception)
Declaration
public void RenderActionError(IAction action, IActionContext context, Exception exception)
Parameters
|
Improve this Doc
View Source
RenderBlock(Block<T>, Block<T>)
Declaration
public override void RenderBlock(Block<T> oldTip, Block<T> newTip)
Parameters
Type |
Name |
Description |
Block<T> |
oldTip |
|
Block<T> |
newTip |
|
Overrides
Libplanet.Blockchain.Renderers.DelayedRenderer<T>.RenderBlock(Libplanet.Blocks.Block<T>, Libplanet.Blocks.Block<T>)
|
Improve this Doc
View Source
RenderBlockEnd(Block<T>, Block<T>)
Declaration
public void RenderBlockEnd(Block<T> oldTip, Block<T> newTip)
Parameters
Type |
Name |
Description |
Block<T> |
oldTip |
|
Block<T> |
newTip |
|
|
Improve this Doc
View Source
RenderReorg(Block<T>, Block<T>, Block<T>)
Declaration
public override void RenderReorg(Block<T> oldTip, Block<T> newTip, Block<T> branchpoint)
Parameters
Overrides
Libplanet.Blockchain.Renderers.DelayedRenderer<T>.RenderReorg(Libplanet.Blocks.Block<T>, Libplanet.Blocks.Block<T>, Libplanet.Blocks.Block<T>)
|
Improve this Doc
View Source
RenderReorgEnd(Block<T>, Block<T>, Block<T>)
Declaration
public override void RenderReorgEnd(Block<T> oldTip, Block<T> newTip, Block<T> branchpoint)
Parameters
Overrides
Libplanet.Blockchain.Renderers.DelayedRenderer<T>.RenderReorgEnd(Libplanet.Blocks.Block<T>, Libplanet.Blocks.Block<T>, Libplanet.Blocks.Block<T>)
|
Improve this Doc
View Source
UnrenderAction(IAction, IActionContext, IAccountStateDelta)
Declaration
public void UnrenderAction(IAction action, IActionContext context, IAccountStateDelta nextStates)
Parameters
|
Improve this Doc
View Source
UnrenderActionError(IAction, IActionContext, Exception)
Declaration
public void UnrenderActionError(IAction action, IActionContext context, Exception exception)
Parameters
Implements