Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return($"{TypeId} ({EventTypeManager.GetTypeFromIndex(TypeId)})");
 }
Exemplo n.º 3
0
 private EventType(Type type)
 {
     TypeId = EventTypeManager.GetTypeIndex(type);
 }