Show / Hide Table of Contents

Interface IRegistrar

Interface allowing to have untyped access to Registrar<T>.

Inherited Members
IHasUniversalID.ControllerID
Namespace: Eco.Core.Systems
Assembly: Eco.Core.dll
Syntax
public interface IRegistrar : IController, IViewController, IHasUniversalID

Properties

Callbacks

Declaration
TrackingCallbacks Callbacks { get; }
Property Value
Type Description
TrackingCallbacks

ContainedType

Declaration
[SyncToView(null, true)]
Type ContainedType { get; }
Property Value
Type Description
System.Type

Count

Declaration
int Count { get; }
Property Value
Type Description
System.Int32

EcopediaPageName

Declaration
string EcopediaPageName { get; }
Property Value
Type Description
System.String

Hidden

Declaration
bool Hidden { get; }
Property Value
Type Description
System.Boolean

OnContentsChangedStates

Declaration
ThreadSafeAction<IHasID, ProposableState> OnContentsChangedStates { get; }
Property Value
Type Description
ThreadSafeAction<IHasID, ProposableState>

OnRenamed

Declaration
ThreadSafeAction<IHasID, string> OnRenamed { get; }
Property Value
Type Description
ThreadSafeAction<IHasID, System.String>

Random

Declaration
IHasID Random { get; }
Property Value
Type Description
IHasID

RegistrarName

Declaration
LocString RegistrarName { get; }
Property Value
Type Description
LocString

SaveObject

Declaration
ISaveablePlugin SaveObject { get; }
Property Value
Type Description
ISaveablePlugin

ShareWithClient

Declaration
bool ShareWithClient { get; }
Property Value
Type Description
System.Boolean

ShowInEcopedia

Declaration
bool ShowInEcopedia { get; }
Property Value
Type Description
System.Boolean

Methods

Add(Type, INetObject, String)

Adds new entity of type which should be derived from ContainedType. Optionally providing netObj and name.

Declaration
IHasID Add(Type type, INetObject netObj = null, string name = null)
Parameters
Type Name Description
System.Type type
INetObject netObj
System.String name
Returns
Type Description
IHasID

All()

Returns all entries in IRegistrar.

Declaration
IEnumerable<IHasID> All()
Returns
Type Description
System.Collections.Generic.IEnumerable<IHasID>

Clear()

Declaration
void Clear()

GetByName(String)

Returns IRegistrar entity by Name.

Declaration
IHasID GetByName(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
IHasID

IdToObj(IWorldObserver)

Declaration
[SyncToView(null, true, ViewType = null)]
BSONValue IdToObj(IWorldObserver worldObserver)
Parameters
Type Name Description
IWorldObserver worldObserver
Returns
Type Description
BSONValue

Initialize()

Declaration
void Initialize()

Insert(IHasID, INetObject, Boolean)

Inserts pre-created obj. It should match ContainedType of registar. Optionally providing netObj.

Declaration
IHasID Insert(IHasID obj, INetObject netObj = null, bool overrideMaxNameLength = false)
Parameters
Type Name Description
IHasID obj
INetObject netObj
System.Boolean overrideMaxNameLength
Returns
Type Description
IHasID

NameToObj(IWorldObserver)

Declaration
[SyncToView(null, true, ViewType = null)]
BSONValue NameToObj(IWorldObserver worldObserver)
Parameters
Type Name Description
IWorldObserver worldObserver
Returns
Type Description
BSONValue

OfType<TResult>()

Returns all entries in IRegistrar of specified type TResult.

Declaration
IEnumerable<TResult> OfType<TResult>()
Returns
Type Description
System.Collections.Generic.IEnumerable<TResult>
Type Parameters
Name Description
TResult

Remove(IHasID)

Declaration
bool Remove(IHasID obj)
Parameters
Type Name Description
IHasID obj
Returns
Type Description
System.Boolean

Remove(INetObject, IHasID)

Declaration
bool Remove(INetObject netObj, IHasID obj)
Parameters
Type Name Description
INetObject netObj
IHasID obj
Returns
Type Description
System.Boolean

Rename(IHasID, String, Boolean, Boolean)

Declaration
bool Rename(IHasID obj, string newName, bool changeNameIfNeeded, bool overrideMaxNameLength = false)
Parameters
Type Name Description
IHasID obj
System.String newName
System.Boolean changeNameIfNeeded
System.Boolean overrideMaxNameLength
Returns
Type Description
System.Boolean

Save()

Marks registry as dirty and asks persistence system to save it.

Declaration
void Save()

Verify()

Verifies all entities in the registry and removes all which fails the verification.

Declaration
void Verify()

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