Interface IRegistrar
Assembly: Eco.Core.dll
Syntax
public interface IRegistrar : IController, IViewController, IHasUniversalID
Properties
Callbacks
Declaration
TrackingCallbacks Callbacks { get; }
Property Value
ContainedType
Declaration
[SyncToView(null, true)]
Type ContainedType { get; }
Property Value
Type |
Description |
System.Type |
|
Count
Declaration
Property Value
Type |
Description |
System.Int32 |
|
EcopediaPageName
Declaration
string EcopediaPageName { get; }
Property Value
Type |
Description |
System.String |
|
Hidden
Declaration
Property Value
Type |
Description |
System.Boolean |
|
OnContentsChangedStates
Declaration
ThreadSafeAction<IHasID, ProposableState> OnContentsChangedStates { get; }
Property Value
OnRenamed
Declaration
ThreadSafeAction<IHasID, string> OnRenamed { get; }
Property Value
Random
Declaration
Property Value
RegistrarName
Declaration
LocString RegistrarName { get; }
Property Value
SaveObject
Declaration
ISaveablePlugin SaveObject { get; }
Property Value
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
All()
Declaration
IEnumerable<IHasID> All()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IHasID> |
|
Clear()
Declaration
GetByName(String)
Declaration
IHasID GetByName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
IdToObj(IWorldObserver)
Declaration
[SyncToView(null, true, ViewType = null)]
BSONValue IdToObj(IWorldObserver worldObserver)
Parameters
Returns
Initialize()
Declaration
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
NameToObj(IWorldObserver)
Declaration
[SyncToView(null, true, ViewType = null)]
BSONValue NameToObj(IWorldObserver worldObserver)
Parameters
Returns
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
Remove(IHasID)
Declaration
Parameters
Type |
Name |
Description |
IHasID |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Remove(INetObject, IHasID)
Declaration
bool Remove(INetObject netObj, IHasID obj)
Parameters
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
Verify()
Verifies all entities in the registry and removes all which fails the verification.
Declaration
Extension Methods