示例#1
0
 public void AddGlobalStateSwitcher <GSS>() where GSS : BaseGlobalStateSwitcher <T>
 {
     if (!HasGlobalStateSwitcherType <GSS>())
     {
         GSS stateSwitcher = Activator.CreateInstance(typeof(GSS)) as GSS;
         _globalStateSwitchers.Add(typeof(GSS), stateSwitcher);
         stateSwitcher.Activate(this);
     }
 }