Class IndexedActionLoader
An IActionLoader implementation for dispatching multiple IActionLoaders.
Implements
Inherited Members
Namespace: Libplanet.Action.Loader
Assembly: Libplanet.Action.dll
Syntax
public class IndexedActionLoader : IActionLoader
Constructors
| Improve this Doc View SourceIndexedActionLoader(IReadOnlyList<(Int64 StartIndex, IActionLoader Loader)>)
Creates an IndexedActionLoader instance.
Declaration
public IndexedActionLoader(IReadOnlyList<(long StartIndex, IActionLoader Loader)> loaders)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<(T1 Item1, T2 Item2)<Int64, IActionLoader>> | loaders | A list of inner IActionLoaders to use. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown for any of the following reasons:
|
Methods
| Improve this Doc View SourceLoadAction(Int64, IValue)
Loads a concrete IAction from value
given index
.
Declaration
public IAction LoadAction(long index, IValue value)
Parameters
Type | Name | Description |
---|---|---|
Int64 | index | The index of a block to use as context for deserializing
|
Bencodex.Types.IValue | value | The Bencodex.Types.IValue to deserialize to an IAction. |
Returns
Type | Description |
---|---|
IAction | An IAction instantiated with |
Exceptions
Type | Condition |
---|---|
InvalidActionException | Thrown when an IAction cannot be
instantiated with given |