Class SingleActionLoader
An IActionLoader implementation for a single IAction type.
Implements
Inherited Members
System.Object.GetType()
System.Object.ToString()
Namespace: Libplanet.Action.Loader
Assembly: Libplanet.Action.dll
Syntax
public class SingleActionLoader : IActionLoader
Constructors
| Improve this Doc View SourceSingleActionLoader(Type)
Creates a new SingleActionLoader instance.
The IAction type to load is restricted to given type
type
, except for those handled by Registry
for system IActions.
Declaration
public SingleActionLoader(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type of IAction to load. It should match
the |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when given type |
Properties
| Improve this Doc View SourceType
An IActionLoader implementation for a single IAction type.
Declaration
public Type Type { get; }
Property Value
Type | Description |
---|---|
Type |
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 |
---|---|---|
System.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 |