Skip to main content

SavingInfoAttribute

A class in Root.Township, Alta.Chunks.

Attribute that gives a type a fixed saving hash, from a string or a number. Without it the hash comes from the type name.

Constructors​

MemberWhat it is
SavingInfoAttribute(string hash, bool isTag = false)Creates a SavingInfoAttribute from hash and isTag.
SavingInfoAttribute(uint hash = 0, bool isTag = false)Creates a SavingInfoAttribute from hash and isTag.

Fields​

1 private and internal field
MemberWhat it is
private static Dictionary<Type, uint> savingHashesCache of hashes by type.

Properties​

MemberWhat it is
uint Hash { get; }The hash this attribute sets.
bool IsTag { get; }Whether the type is a tag.

Methods​

MemberWhat it is
static uint GetHash(Type type)The type's saving hash: from its attribute if set and non-zero, otherwise a hash of its name. Cached.