using System;

namespace Stary.Evo
{
    public interface ICanRegisterEvent:IBelongToArchitecture
    {
        
    }
    public static class CanRegisterEventExtension
    {

        public static IUnRegister RegisterEvent<T>(this ICanRegisterEvent self,T key,Action onEvent) where T : IConvertible
        {
            
            return self.GetArchitecture().RegisterEvent(key,onEvent);
        }
        public static IUnRegister RegisterEvent<T,T1>(this ICanRegisterEvent self,T key,Action<T1> onEvent) where T : IConvertible
        {
            
            return self.GetArchitecture().RegisterEvent(key,onEvent);
        }
        public static IUnRegister RegisterEvent<T,T1,T2>(this ICanRegisterEvent self,T key,Action<T1,T2> onEvent) where T : IConvertible
        {
            
            return self.GetArchitecture().RegisterEvent(key,onEvent);
        }
  
        public static IUnRegister RegisterEvent<T,T1,T2,T3>(this ICanRegisterEvent self,T key,Action<T1,T3> onEvent) where T : IConvertible
        {
            
            return self.GetArchitecture().RegisterEvent(key,onEvent);
        }
        public static IUnRegister RegisterEvent<T>(this ICanRegisterEvent self,T key,Action<object[]> onEvent) where T : IConvertible
        {
            
           return self.GetArchitecture().RegisterEvent(key,onEvent);
        }
        
        
        public static void UnRegisterEvent<T>(this ICanRegisterEvent self,T key,Action onEvent) where T : IConvertible
        {
            
            self.GetArchitecture().UnRegisterEvent(key,onEvent);
        }
        public static void UnRegisterEvent<T,T1>(this ICanRegisterEvent self,T key,Action<T1> onEvent) where T : IConvertible
        {
            
            self.GetArchitecture().UnRegisterEvent(key,onEvent);
        }
        public static void UnRegisterEvent<T,T1,T2>(this ICanRegisterEvent self,T key,Action<T1,T2> onEvent) where T : IConvertible
        {
            
            self.GetArchitecture().UnRegisterEvent(key,onEvent);
        }
  
        public static void UnRegisterEvent<T,T1,T2,T3>(this ICanRegisterEvent self,T key,Action<T1,T3> onEvent) where T : IConvertible
        {
            
            self.GetArchitecture().UnRegisterEvent(key,onEvent);
        }
        public static void UnRegisterEvent<T>(this ICanRegisterEvent self,T key,Action<object[]> onEvent) where T : IConvertible
        {
            
            self.GetArchitecture().UnRegisterEvent(key,onEvent);
        }
    }
}