Show / Hide Table of Contents

Class ActionTypeAttribute

Indicates that an action class (i.e., a class implementing IAction) can be held by transactions and blocks. It also gives an action class a TypeIdentifier for serialization and deserialization.

Inheritance
Object
ActionTypeAttribute
Namespace: Libplanet.Action
Assembly: Libplanet.dll
Syntax
public class ActionTypeAttribute : Attribute

Constructors

| Improve this Doc View Source

ActionTypeAttribute(String)

Creates an ActionTypeAttribute with a given typeIdentifier.

Declaration
public ActionTypeAttribute(string typeIdentifier)
Parameters
Type Name Description
String typeIdentifier

An action class's unique identifier for serialization and deserialization.

Properties

| Improve this Doc View Source

TypeIdentifier

An action class's unique identifier for serialization and deserialization.

Declaration
public string TypeIdentifier { get; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

ValueOf(Type)

Gets the TypeIdentifier for a given action class.

Declaration
public static string? ValueOf(Type actionType)
Parameters
Type Name Description
Type actionType

A object of an action class to know its annotated TypeIdentifier.

Returns
Type Description
Nullable<String>

The TypeIdentifier of the given actionType if it's annotated with ActionTypeAttribute. If it's not annotated returns null.

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