public string CreateNamespace(TypeDef type, string ns) { string newName; string asmFullName; if (type.Module.Assembly != null) { asmFullName = type.Module.Assembly.FullName; } else { asmFullName = "<no assembly>"; } // Make sure that two namespaces with the same names in different modules aren't renamed // to the same name. var key = string.Format(" [{0}] [{1}] [{2}] [{3}] ", type.Module.Location, asmFullName, type.Module.Name, ns); if (namespaceToNewName.TryGetValue(key, out newName)) { return(newName); } return(namespaceToNewName[key] = createNamespaceName.Create()); }
public string GetName(string oldName, INameCreator nameCreator) { return(GetName(oldName, () => nameCreator.Create())); }
public string GetName(string oldName, INameCreator nameCreator) { return GetName(oldName, () => nameCreator.Create()); }
public string GetNewFieldName(string oldName, INameCreator nameCreator) { return(existingVariableNames.GetName(oldName, () => nameCreator.Create())); }
public string GetNewFieldName(string oldName, INameCreator nameCreator) { return existingVariableNames.GetName(oldName, () => nameCreator.Create()); }
public string GetName(string oldName, INameCreator nameCreator) => GetName(oldName, () => nameCreator.Create());