Beispiel #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.
     }
 }
Beispiel #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!
 }
Beispiel #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);
 }