public RenamedClass SearchForNewName(EntityName target) { if (name.NameNew != null) { if (target.Compare(NameNew)) { return(this); } if (target.Compare(NameNewFull)) { return(this); } } foreach (RenamedBase item in items) { if (item.EntityType != EntityType.Class) { continue; } RenamedClass c = (RenamedClass)item; c = c.SearchForNewName(target); if (c != null) { return(c); } } return(null); }
public bool Compare(string name) { int i = name.IndexOf('('); EntityName ename = name.Substring(0, i); if (!ename.Compare(this.name.NameNew, false)) { return(false); } int j = name.IndexOf(')', i); string p = name.Substring(i + 1, j - i - 1); string[] strings = p.Split(new string[] { ", ", "," }, StringSplitOptions.RemoveEmptyEntries); if (strings.Length != methodParams.Count) { return(false); } for (int k = 0; k < strings.Length; k++) { string s = strings[k].Trim(' '); if (s == "*") { continue; } EntityName e = s; if (!e.Compare(methodParams[k].NameNew, true)) { return(false); } } return(true); }