Inheritance: IDisposable
Ejemplo n.º 1
0
        /// <summary>Adds a handler for a specific event type.</summary>
        /// <param name="eventType">The type of the event.</param>
        /// <param name="handler">The handler to invoke when the event is fired.</param>
        public void Subscribe(Type eventType, Action handler)
        {
            // Create the storage wrapper.
            EventBusHandler item = new EventBusHandler(eventType, handler);

            // Store the wrapper.
            handlers.Add(item);
        }