﻿using System;

namespace AsmodeeDigital.Common.Plugin.Manager.Event
{
    /// <summary>
    /// Abstract model of an event manager (.Net events)
    /// </summary>
    public interface IEventManager
    {
        /// <summary>
        /// Add an event to the queue
        /// </summary>
        /// <param name="action">Event to raise</param>
        void QueueEvent(Action action);

        /// <summary>
        /// Add a one-parameterized event to the queue
        /// </summary>
        /// <typeparam name="T">Type of the parameter</typeparam>
        /// <param name="action">Event to raise</param>
        /// <param name="parameter">Parameter of the event</param>
        void QueueEvent<T>(Action<T> action, T parameter);

        /// <summary>
        /// Add a two-parameterized event to the queue
        /// </summary>
        /// <typeparam name="T1">Type of the first parameter</typeparam>
        /// <typeparam name="T2">Type of the second parameter</typeparam>
        /// <param name="action">Event to raise</param>
        /// <param name="parameter1">First parameter of the event</param>
        /// <param name="parameter2">Second parameter of the event</param>
        void QueueEvent<T1,T2>(Action<T1,T2> action, T1 parameter1, T2 parameter2);
    }
}
