Show / Hide Table of Contents

Class SingleActionLoader

An IActionLoader implementation for a single IAction type.

Inheritance
System.Object
SingleActionLoader
Implements
IActionLoader
Namespace: Libplanet.Action.Loader
Assembly: Libplanet.Action.dll
Syntax
public class SingleActionLoader : object, IActionLoader

Constructors

| Improve this Doc View Source

SingleActionLoader(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 's type parameter.

Properties

| Improve this Doc View Source

Type

An IActionLoader implementation for a single IAction type.

Declaration
public Type Type { get; }
Property Value
Type Description
Type

Methods

| Improve this Doc View Source

LoadAction(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 value.

IValue value

The to deserialize to an IAction.

Returns
Type Description
IAction

An IAction instantiated with value.

Exceptions
Type Condition
InvalidActionException

Thrown when an IAction cannot be instantiated with given index and value.

Implements

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