Show / Hide Table of Contents

Class GeneratedRegistrarWrapper<TContained>

A generated registrar is one whose data is created entirely dynamically, but then stored as an ID. It wraps a regular registrar, allowing it to save references and get the usual registrar benefits (linking, etc) It functions by only saving names->IDs, and fixing up on load. This allows us to use regular reference serialization (ie, you can store references to Tags instead of some TagHandle class), as well as makes the storage of tags a direct reference when running, and simply an int ID otherwise. We make this a templated class so we have separate statics for each type that implements it (a trick to allow us to have serialization and static data in a single structure).

Inheritance
System.Object
GeneratedRegistrarWrapper<TContained>
Namespace: Eco.Core.Systems
Assembly: Eco.Core.dll
Syntax
public class GeneratedRegistrarWrapper<TContained> : Object where TContained : class, IHasID
Type Parameters
Name Description
TContained

Constructors

GeneratedRegistrarWrapper()

Declaration
public GeneratedRegistrarWrapper()

Fields

Reg

Declaration
public static GeneratedRegistrar<TContained> Reg
Field Value
Type Description
GeneratedRegistrar<TContained>

Methods

Init(LocString, Boolean, ISaveablePlugin, String)

Declaration
public void Init(LocString registrarName, bool shareWithClient, ISaveablePlugin save, string ecopediaPageName = null)
Parameters
Type Name Description
LocString registrarName
System.Boolean shareWithClient
ISaveablePlugin save
System.String ecopediaPageName

SetupDone()

Declaration
public static void SetupDone()

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
☀
☾