예제 #1
0
 public void LoadFromModel()
 {
     foreach (IDsmAction action in _model.GetActions())
     {
         if (_types.ContainsKey(action.Type))
         {
             Type     type         = _types[action.Type];
             object[] args         = { _model, action.Data };
             object   argumentList = args;
             IAction  instance     = Activator.CreateInstance(type, argumentList) as IAction;
             if (instance != null)
             {
                 _actionManager.Add(instance);
             }
         }
     }
 }