public void UpdateNewName(IEntitySearcher searcher)
        {
            nameNew.UpdateGenericParams(searcher);

            if (nameNew.Namespace == null)
            {
                return;
            }

            // some optimization
            if (nameNew.Namespace.StartsWith("System") && !searcher.HaveSystemEntities)
            {
                return;
            }

            if (!nameNew.Compare(nameOld, false))
            {
                return;
            }

            RenamedBase r = searcher.SearchForOldName(nameNew);

            if (r != null)
            {
                nameNew.AssignName(r.NameNew);
            }
        }
    public void UpdateNewName(IEntitySearcher searcher)
    {
      nameNew.UpdateGenericParams(searcher);

      if (nameNew.Namespace == null)
        return;

      // some optimize
      if (nameNew.Namespace.StartsWith("System") && !searcher.HaveSystemEntities)
        return;

      if (!nameNew.Compare(nameOld, false))
        return;

      RenamedBase r = searcher.SearchForOldName(nameNew);
      if (r != null)
        nameNew.AssignName(r.NameNew);
    }
        public void UpdateGenericParams(IEntitySearcher searcher)
        {
            if (genericParams == null)
            {
                return;
            }

            for (int i = 0; i < genericParams.Length; i++)
            {
                if (genericParams[i].@namespace != null &&
                    (string.Compare(genericParams[i].nsCache[0], "System", StringComparison.Ordinal) != 0 || searcher.HaveSystemEntities))
                {
                    RenamedBase renamedBase = searcher.SearchForOldName(genericParams[i]);
                    if (renamedBase != null)
                    {
                        genericParams[i].AssignName(renamedBase.Name.NameNew);
                    }

                    genericParams[i].UpdateGenericParams(searcher);
                }
            }
        }
    public void UpdateGenericParams(IEntitySearcher searcher)
    {
      if (genericParams == null)
        return;

      for (int i = 0; i < genericParams.Length; i++)
      {
        if (genericParams[i].@namespace != null &&
            (string.Compare(genericParams[i].nsCache[0], "System", StringComparison.Ordinal) != 0 || searcher.HaveSystemEntities))
        {
          RenamedBase renamedBase = searcher.SearchForOldName(genericParams[i]);
          if (renamedBase != null)
            genericParams[i].AssignName(renamedBase.Name.NameNew);

          genericParams[i].UpdateGenericParams(searcher);
        }
      }
    }