예제 #1
0
 private static void PropagateChange(NameGenerator parentGenerator, DomainPropertyInfo propertyInfo, object oldValue, object newValue)
 {
     foreach (NameGenerator refinement in parentGenerator.RefinedByGeneratorCollection)
     {
         if (propertyInfo.GetValue(refinement).Equals(oldValue))
         {
             propertyInfo.SetValue(refinement, newValue);
             PropagateChange(refinement, propertyInfo, oldValue, newValue);
         }
     }
 }
예제 #2
0
 private static void PropagateChange(NameGenerator parentGenerator, DomainPropertyInfo propertyInfo, object oldValue, object newValue, Type nameUsageType)
 {
     foreach (NameGenerator refinement in parentGenerator.RefinedByGeneratorCollection)
     {
         Type refinementUsage = refinement.NameUsageType;
         if (refinementUsage == null)
         {
             // Make sure we skip the level to get the corresponding usages
             PropagateChange(refinement, propertyInfo, oldValue, newValue, nameUsageType);
         }
         else if (refinementUsage == nameUsageType &&
                  propertyInfo.GetValue(refinement).Equals(oldValue))
         {
             propertyInfo.SetValue(refinement, newValue);
             PropagateChange(refinement, propertyInfo, oldValue, newValue, nameUsageType);
         }
     }
 }