Table of Contents

Class LazyState<TState, TEncoding>

Namespace
Nekoyume.Model.State
Assembly
Lib9c.dll
[Serializable]
public sealed class LazyState<TState, TEncoding> : IState, ISerializable where TState : IState where TEncoding : IValue

Type Parameters

TState
TEncoding
Inheritance
LazyState<TState, TEncoding>
Implements
Inherited Members

Constructors

LazyState(TState)

public LazyState(TState loadedValue)

Parameters

loadedValue TState

LazyState(TEncoding, Func<TEncoding, TState>)

public LazyState(TEncoding serialized, Func<TEncoding, TState> loader)

Parameters

serialized TEncoding
loader Func<TEncoding, TState>

Properties

State

public TState State { get; }

Property Value

TState

Methods

GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo with the data needed to serialize the target object.

public void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo to populate with data.

context StreamingContext

The destination (see StreamingContext) for this serialization.

Exceptions

SecurityException

The caller does not have the required permission.

GetStateOrSerializedEncoding(out TState, out TEncoding)

public bool GetStateOrSerializedEncoding(out TState loadedState, out TEncoding serialized)

Parameters

loadedState TState
serialized TEncoding

Returns

bool

LoadState(LazyState<TState, TEncoding>)

public static TState LoadState(LazyState<TState, TEncoding> lazyState)

Parameters

lazyState LazyState<TState, TEncoding>

Returns

TState

LoadStatePair<T>(KeyValuePair<T, LazyState<TState, TEncoding>>)

public static KeyValuePair<T, TState> LoadStatePair<T>(KeyValuePair<T, LazyState<TState, TEncoding>> lazyPair)

Parameters

lazyPair KeyValuePair<T, LazyState<TState, TEncoding>>

Returns

KeyValuePair<T, TState>

Type Parameters

T

Serialize()

public IValue Serialize()

Returns

IValue