Show / Hide Table of Contents

Class WorldDelta

Inheritance
Object
WorldDelta
Implements
IWorldDelta
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
System.Object.ToString()
Namespace: Libplanet.Action.State
Assembly: Libplanet.Action.dll
Syntax
public class WorldDelta : IWorldDelta

Constructors

| Improve this Doc View Source

WorldDelta()

Declaration
public WorldDelta()

Properties

| Improve this Doc View Source

Accounts

A dictionary representing changed account states for each Address. This lasts till new empty delta instance has been made.

Declaration
public IImmutableDictionary<Address, IAccount> Accounts { get; }
Property Value
Type Description
IImmutableDictionary<Address, IAccount>
| Improve this Doc View Source

Uncommitted

A dictionary representing changed account states for each Address. Elements of this collection are removed when CommitAccount(Address) called by corresponding Address.

Declaration
public IImmutableDictionary<Address, IAccount> Uncommitted { get; }
Property Value
Type Description
IImmutableDictionary<Address, IAccount>

Methods

| Improve this Doc View Source

CommitAccount(Address)

Remove item from Uncommitted dictionary where its key is address.

Declaration
public IWorldDelta CommitAccount(Address address)
Parameters
Type Name Description
Address address

Address of IAccount to remove from Uncommitted.

Returns
Type Description
IWorldDelta

New IWorldDelta item of address removed from Uncommitted. If corresponding uncommitted does not exist, returns identical one.

| Improve this Doc View Source

SetAccount(Address, IAccount)

Set account on both of Accounts and Uncommitted dictionaries. If IAccount already exists on address, update with new account.

Declaration
public IWorldDelta SetAccount(Address address, IAccount account)
Parameters
Type Name Description
Address address

Address to set on.

IAccount account

IAccount to set.

Returns
Type Description
IWorldDelta

New IWorldDelta that account is properly set.

Implements

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