Namespace Eco.Core.Utils
Classes
AABB
AABBTree
AABBTreeT<T>
ByteUtil
ClientControllerExtensions
ConcurrentExtensions
ControllerDictionary<TKey, TValue>
ControllerHashSet<T>
ControllerList<T>
A thread-safe list of items, which automatically handles changed calls when mutating the list. Initialize must be called before use.
CoreEnumerableExtensions
Extensions for System.Collections.Generic.IEnumerable<> which aware about Eco.Core collections.
CoreReflectionUtils
CoreReflectionUtils.ActionWithRefParam<T, TParam>
CountEvent
CountLock
DictionaryEnumerator<TKey, TValue>
Dirtyable<T>
Helps to track value dirty state. When Value assigned and if it not equals to previous value then Dirty flag sets.
DirtyFlag
Handles tracking a dirty state, and now allowing to 'SetDirty' while its in the process of being updated. This way, if a dirty flag tries to set while its doing the dirty processing, it will make it dirty even after dirty processing complete.
DirtySet<T>
Component class to maintain a 'dirty' set of entries of type T that will periodically process and clear. It will check whenever ticked, and whenever CleanTimer is ready, which must be initialized in the implementing class.
DisposableTimer
Dispository
Dispository (Disposable Repository) used for objects with IDisposable interface which won't be disposed in usual way, because they are singletons in example. In shutdown logic you should call DisposeAll to proper dispose all registered objects.
DoubleEnumerationGuard
Utility class which prevents double-enumeration for System.Collections.IEnumerable. Some enumerable may not allow double enumeration which leads to invalid state and may use this class for asserts. I.e. EnumerableSerializer creates enumerable for Steam. If double enumerated then Stream will return elements from current Stream read position which is invalid after first enumeration.
Eval
Eval<T>
HandleEvent
An event that can have callbacks removed via a passed handle.
IEventSubscription
ImmutableHelper
InitializableExtension
Initializer
LazyResult
Simple struct for tracking a result that holds off generating a string till requested
LongPaths
OptimizedActivator
https://rogerjohansson.blog/2008/02/28/linq-expressions-creating-objects/ https://stackoverflow.com/a/16162475 https://stackoverflow.com/questions/13041674/create-func-or-action-for-any-method-using-reflection-in-c Check above links for details.
OptimizedActivator.ActivatorDelegate<T>
PriorityAfterAttribute
Allows defining priority based on another type's priority. IE, you can say 'this type should be higher priority value than that type'.
PriorityAttribute
PriorityBeforeAttribute
Allows defining prirority based on another type's priority. IE, you can say 'this type should be lower priority value than that type'.
PriorityExtensions
ProcessorUtils
RecursiveSubscriptions
Helper object for implementing proper recursive subscriptions for the complex structures. For example, it is used in Election.cs for updating Description which includes information about different civics objects.
ReentranceDetection<TQuery>
ReentrantQuery<T>
ReferenceItem<TClass, TSubClass>
ReferenceList<TClass, TSubClass>
RelativePriorityAttribute
Base class for attributes that define priority relatively.
Result
ResultBuilder
ResultExtensions
ResultType
RPCUtils
SerializedSynchronizedCollection<T>
ServerListExtensions
SingletonUtils
Sphere
StringUtils
SubscriptionExtensions
ThreadSafeAction
ThreadSafeAction<T>
ThreadSafeAction<T1, T2>
ThreadSafeAction<T1, T2, T3>
ThreadSafeAction<T1, T2, T3, T4>
ThreadSafeActionBase<TAction>
ThreadSafeActionBase<TAction>.DelegateDebug
ThreadSafeActions
ThreadSafeBidirectionalMap<TKey, TVal>
ThreadSafeBidirectionalMap<TKey, TVal>.State
ThreadSafeDictionary<TKey, TValue>
ThreadSafeHashSet<T>
ThreadSafeLimitedHistory<T>
Limited size history which automatically ejects old elements when more than N elements added. New elements added to top of the history (as most recent) and will be returned first while enumeration. Elements can't be directly removed from history one by one, but you can Clear() whole history.
ThreadSafeList<T>
ThreadSafeQueue<T>
Only use this collection when absolutely necessary when you can't use System.Collections.Concurrent.ConcurrentQueue<> instead. It known to have very bad performance and memory usage for often updated big collections, because all new elements added to stack which then reversed when you need to dequeue element.
ThreadSafeSubscriptions
Thread safe implementation of ISubscriptionsList for server-side code.
ThreadUtils
TimedTask
TrackedCollectionExtensions
TrackingCallbacks
TypeExtensions
TypeUtils
ValResult
ValResult<T>
VectorCoreUtils
ViewExtensions
WaitUtils
WeakKeyConcurrentDictionary<TKey, TValue>
Concurrent dictionary which uses weak references for key values. This way you may add mapping without care key referenced object will never be released. You need eventually call Cleanup() to ensure entries with dead references removed.
WeakReferenceExtensions
Interfaces
IClientControlledContainer
IClientControlledList
IContainsDynamicFlags
Properties with [DynamicFlags] attribute will result client side's selector to try to look for this container in their parent. If there is an entry with the same name, then selector will use contained flags instead of the default ones. Nothing will be replaced if there is no such entry. For a demo see how wages declare their WagesPaidFromAccount and how AppointedTitle clears its InJurisdiction flag.
IEvent
IHashSet
IInitializationSubscribable
IMasterList<T>
ISnapshotable
Interface which may be implemented by collection which supports snapshots of elements (this snapshot is safe to use in thread-safe environment).
ISnapshotable<T>
Interface which may be implemented by collection which supports snapshots of elements (this snapshot is safe to use in thread-safe environment).