/// <summary> /// Actions to be taken when the variable's value changes /// </summary> /// <param name="cacheImpact"></param> public void HandleChange(CacheImpact cacheImpact) { StructureValue value = Enclosing as StructureValue; if (value != null) { IVariable variable = value.Enclosing as IVariable; if (variable != null) { variable.HandleChange(cacheImpact); } } StructureElement.HandleChange(cacheImpact); }
/// <summary> /// Handles the changes for this variable /// </summary> /// <param name="cacheImpact"></param> public override void HandleChange(CacheImpact cacheImpact) { base.HandleChange(cacheImpact); Structure structure = Type as Structure; if (structure != null) { structure.HandleChange(cacheImpact); } StructureValue enclosingStructureValue = Enclosing as StructureValue; if (enclosingStructureValue != null) { IVariable enclosingVariable = enclosingStructureValue.Enclosing as IVariable; if (enclosingVariable != null) { enclosingVariable.HandleChange(cacheImpact); } } }