Пример #1
0
 public override void RemoveVariable(MetaType metaType, MetaVariable metaVariable)
 {
     base.RemoveVariable(metaType, metaVariable);
     foreach (MetaClass metaClass in this.classes)
     {
         metaClass.RemoveVariable(metaType, metaVariable);
     }
 }
Пример #2
0
 public override void UpdateVariable(MetaType metaType, MetaVariable oldVariable, MetaVariable newVariable)
 {
     base.UpdateVariable(metaType, oldVariable, newVariable);
     foreach (MetaClass metaClass in this.classes)
     {
         metaClass.UpdateVariable(metaType, oldVariable, newVariable);
     }
 }
Пример #3
0
 public override void RemoveVariable(MetaType metaType, MetaVariable metaVariable)
 {
     base.RemoveVariable(metaType, metaVariable);
     if (this.Equals(metaType))
     {
         for (int i = 0; i < this.variables.Count; i++)
         {
             if (this.variables[i].Equals(metaVariable))
             {
                 this.variables.RemoveAt(i);
                 break;
             }
         }
     }
 }
Пример #4
0
 public override void UpdateVariable(MetaType metaType, MetaVariable oldVariable, MetaVariable newVariable)
 {
     base.UpdateVariable(metaType, oldVariable, newVariable);
     if (this.Equals(metaType))
     {
         for (int i = 0; i < this.variables.Count; i++)
         {
             if (this.variables[i].Equals(oldVariable))
             {
                 this.variables[i] = newVariable;
             }
             else
             {
                 this.variables[i].UpdateVariable(metaType, oldVariable, newVariable);
             }
         }
     }
 }
Пример #5
0
 public MetaVariable FindMatchingVariable(MetaVariable metaVariable)
 {
     return(this.variables.Find(v => v.Equals(metaVariable)));
 }