Show / Hide Table of Contents

Class SerializationTimestamp

This struct should be used for auto-generated serialization timestamps which then may be used to check if serialized version is up to date. When loaded it always contains last timestamp when it was serialized which may be used to ensure serialized versions contains actual copy and invalidate it if required (i.e. for height caches). Can be just added to serialized class which aware about serialization timestamp. IMPORTANT: It should be non-readonly field! If copied (i.e. when assigned by value) then it will contain snapshot value for LastSerializedValue.

Inheritance
System.Object
SerializationTimestamp
Namespace: Eco.Core.Serialization
Assembly: Eco.Core.dll
Syntax
public sealed class SerializationTimestamp : ValueType

Constructors

SerializationTimestamp(Double)

Declaration
public SerializationTimestamp(double lastSerializedValue)
Parameters
Type Name Description
System.Double lastSerializedValue

Properties

LastSerializedValue

Contains last serialized Eco.Core.Serialization.SerializationTimestamp.Value (actually timestamp when it was last time serialized and persisted). The value is comparable with Seconds.

Declaration
public double LastSerializedValue { get; }
Property Value
Type Description
System.Double

Operators

Implicit(SerializationTimestamp to Double)

May be implicitly converted to System.Double (will use LastSerializedValue).

Declaration
public static implicit operator double (SerializationTimestamp timestamp)
Parameters
Type Name Description
SerializationTimestamp timestamp
Returns
Type Description
System.Double

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾