Пример #1
0
 private void EndElement(string name)
 {
     //Assembly executingAssembly = Assembly.GetExecutingAssembly();
     //Type type = executingAssembly.GetType("MGFramework." + name, false);
     Type type = Type.GetType("MGFramework." + name, false);
     if (type != _curClass)
     {
         if (CurrentDefinitionObject != null)
         {
             CurrentDefinitionObject.UndefinedElementDidFinish(name);
         }
         return;
     }
     CurrentDefinitionObject.DefinitionObjectDidFinishParsing();
     if (CurrentDefinitionObject.ParentDefinitionObject != null)
     {
         CurrentDefinitionObject.ParentDefinitionObject.ChildDefinitionObjectDidFinishParsing(
             CurrentDefinitionObject);
     }
     CurrentDefinitionObject = CurrentDefinitionObject.ParentDefinitionObject;
     if (CurrentDefinitionObject != null)
     {
         _curClass = CurrentDefinitionObject.GetType();
         _isCurrentElementDefined = true;
         return;
     }
     _curClass = null;
     _isCurrentElementDefined = false;
 }
Пример #2
0
 public override void ChildDefinitionObjectDidFinishParsing(DefinitionObject childObject)
 {
     base.ChildDefinitionObjectDidFinishParsing(childObject);
     if (childObject.GetType() == typeof (PartState))
     {
         var item = (PartState) childObject;
         PartStates.Add(item);
     }
 }