Class EcoObjectManager
Inheritance
System.Object
EcoObjectManager
Assembly: Eco.Gameplay.dll
Syntax
public class EcoObjectManager : Singleton<EcoObjectManager>, IServerPlugin
Constructors
EcoObjectManager()
Declaration
public EcoObjectManager()
Methods
Add(IEcoObject)
Declaration
public static void Add(IEcoObject ecoObject)
Parameters
GetCategory()
Declaration
public string GetCategory()
Returns
Type |
Description |
System.String |
|
GetStatus()
Declaration
public string GetStatus()
Returns
Type |
Description |
System.String |
|
MarkAsDirty(IEcoObject)
Marks Eco object as dirty. This object will be saved in background by StorageManager.
It prevents too often saves for object for often modifications and ensures object will be eventually save latest modifications.
If object isn't thread-safe for concurrent modifications then use Modify<T>(T, Action<T>) instead of make direct changes and call MarkAsDirty(IEcoObject).
Declaration
public static void MarkAsDirty(IEcoObject obj)
Parameters
Type |
Name |
Description |
IEcoObject |
obj |
object marked as dirty.
|
Modify<T>(T, Action<T>)
If Eco object isn't safe for concurrent modifications then instead of using MarkAsDirty(IEcoObject) directly make all object modifications inside of modifyAction.
It also marks object as dirty.
It will guarantee object won't be saved during modification and no other concurrent modification will be performed to that object.
Declaration
public static void Modify<T>(T obj, Action<T> modifyAction)
where T : IEcoObject
Parameters
Type |
Name |
Description |
T |
obj |
object to modify.
|
System.Action<T> |
modifyAction |
action which modifies object.
|
Type Parameters
Remove(IEcoObject)
Declaration
public static void Remove(IEcoObject ecoObject)
Parameters
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Implements
Extension Methods