예제 #1
0
 /*
  *  Updates the parent for non private types.
  */
 public static void UpdateParent(this IRTypeNode type, IRNamespace newNS)
 {
     if (type.IsPrivate == false)
     {
         type.Parent = newNS;
     }
     else
     {
         // We leave private types alone because they must keep referencing their parent class.
     }
 }
예제 #2
0
 /*
  *  Updates the naming of the given type.
  */
 public static void UpdateTypeName(this IRTypeNode type, IRNamespace newNS)
 {
     // Only update the full name.
     type.FullName = newNS.FullName.Trim('.') + "." + type.ShortName;
     // Don't touch the shortname!
 }
예제 #3
0
 /*
  *  Updates all references made from the given type to other types.
  */
 public static void UpdateTypeReferences(this IRTypeNode type, IRNamespace newNS,
                                         IRNamespace oldNS)
 {
     type.UpdateTypeName(newNS);
     type.UpdateParent(newNS);
 }