private void Expand(int newSize)
        {
            var wasLength = eventHandlers.Length;

            Array.Resize(ref eventHandlers, newSize);
            for (int i = wasLength; i < eventHandlers.Length; i++)
            {
                var genericType = typeof(EventHandler <>);
                var arrayType   = genericType.MakeGenericType(EventTypeManager.GetTypeFromIndex((ushort)i));
                eventHandlers[i] = (IEventHandler)Activator.CreateInstance(arrayType);
            }
        }
Esempio n. 2
0
 public override string ToString()
 {
     return($"{TypeId} ({EventTypeManager.GetTypeFromIndex(TypeId)})");
 }
Esempio n. 3
0
 private EventType(Type type)
 {
     TypeId = EventTypeManager.GetTypeIndex(type);
 }