public virtual void InitModular()
        {
            mCreaterByAttributes   = new List <ModularNoticeCreater>();
            mDecoraterByAttributes = new List <ModularNoticeDecorater>();
            mListenerByAttributes  = new List <ModularNoticeListener>();
            mModularNotifierMapper = new KeyValueList <Action <INoticeBase <int> >, ModularNotifier>();

            if (NoticeCreates == default)
            {
                NoticeCreates = new ModularNoticeCreater[0];
            }
            else
            {
            }

            if (NoticeDecoraters == default)
            {
                NoticeDecoraters = new ModularNoticeDecorater[0];
            }
            else
            {
            }

            if (NoticeListeners == default)
            {
                NoticeListeners = new ModularNoticeListener[0];
            }
            else
            {
            }

            InitCustomHandlers();

            GenerateModularHandlers();
        }
Exemple #2
0
 /// <summary>修饰化模块消息侦听处理方法的修改器</summary>
 private NoticeListener OnSetListener(NoticeListener a, ModularNoticeListener b, bool isAdd)
 {
     if (isAdd)
     {
         a += b.Handler;
     }
     else
     {
         a -= b.Handler;
     }
     return(a);
 }
Exemple #3
0
 /// <summary>修饰化模块消息侦听处理方法的获取器</summary>
 private NoticeListener OnGetListener(ModularNoticeListener param)
 {
     return(param.Handler);
 }
Exemple #4
0
 public void AddNoticeListener(ModularNoticeListener target, bool willSort = false)
 {
     mLIsteners.AddHandler(ref target, willSort);
 }