Merge branch 'master' into dnr
This commit is contained in:
commit
b8879e74e6
|
@ -44,8 +44,54 @@ namespace de4dot.blocks {
|
||||||
TypeReference,
|
TypeReference,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ScopeAndTokenKey {
|
||||||
|
readonly IMetadataScope scope;
|
||||||
|
readonly int token;
|
||||||
|
|
||||||
|
public ScopeAndTokenKey(TypeReference type)
|
||||||
|
: this(type.Scope, type.MetadataToken.ToInt32()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScopeAndTokenKey(FieldReference field)
|
||||||
|
: this(field.DeclaringType == null ? null : field.DeclaringType.Scope, field.MetadataToken.ToInt32()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScopeAndTokenKey(MethodReference method)
|
||||||
|
: this(method.DeclaringType == null ? null : method.DeclaringType.Scope, method.MetadataToken.ToInt32()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScopeAndTokenKey(PropertyReference prop)
|
||||||
|
: this(prop.DeclaringType == null ? null : prop.DeclaringType.Scope, prop.MetadataToken.ToInt32()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScopeAndTokenKey(EventReference evt)
|
||||||
|
: this(evt.DeclaringType == null ? null : evt.DeclaringType.Scope, evt.MetadataToken.ToInt32()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScopeAndTokenKey(IMetadataScope scope, int token) {
|
||||||
|
this.scope = scope;
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() {
|
||||||
|
return token + MemberReferenceHelper.scopeHashCode(scope);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object obj) {
|
||||||
|
var other = obj as ScopeAndTokenKey;
|
||||||
|
if (other == null)
|
||||||
|
return false;
|
||||||
|
return token == other.token &&
|
||||||
|
MemberReferenceHelper.compareScope(scope, other.scope);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString() {
|
||||||
|
return string.Format("{0:X8} {1}", token, scope);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class TypeReferenceKey {
|
public class TypeReferenceKey {
|
||||||
TypeReference typeRef;
|
readonly TypeReference typeRef;
|
||||||
|
|
||||||
public TypeReference TypeReference {
|
public TypeReference TypeReference {
|
||||||
get { return typeRef; }
|
get { return typeRef; }
|
||||||
|
@ -72,7 +118,7 @@ namespace de4dot.blocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FieldReferenceKey {
|
public class FieldReferenceKey {
|
||||||
FieldReference fieldRef;
|
readonly FieldReference fieldRef;
|
||||||
|
|
||||||
public FieldReference FieldReference {
|
public FieldReference FieldReference {
|
||||||
get { return fieldRef; }
|
get { return fieldRef; }
|
||||||
|
@ -99,7 +145,7 @@ namespace de4dot.blocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PropertyReferenceKey {
|
public class PropertyReferenceKey {
|
||||||
PropertyReference propRef;
|
readonly PropertyReference propRef;
|
||||||
|
|
||||||
public PropertyReference PropertyReference {
|
public PropertyReference PropertyReference {
|
||||||
get { return propRef; }
|
get { return propRef; }
|
||||||
|
@ -126,7 +172,7 @@ namespace de4dot.blocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EventReferenceKey {
|
public class EventReferenceKey {
|
||||||
EventReference eventRef;
|
readonly EventReference eventRef;
|
||||||
|
|
||||||
public EventReference EventReference {
|
public EventReference EventReference {
|
||||||
get { return eventRef; }
|
get { return eventRef; }
|
||||||
|
@ -153,7 +199,7 @@ namespace de4dot.blocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MethodReferenceKey {
|
public class MethodReferenceKey {
|
||||||
MethodReference methodRef;
|
readonly MethodReference methodRef;
|
||||||
|
|
||||||
public MethodReference MethodReference {
|
public MethodReference MethodReference {
|
||||||
get { return methodRef; }
|
get { return methodRef; }
|
||||||
|
@ -180,7 +226,7 @@ namespace de4dot.blocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FieldReferenceAndDeclaringTypeKey {
|
public class FieldReferenceAndDeclaringTypeKey {
|
||||||
FieldReference fieldRef;
|
readonly FieldReference fieldRef;
|
||||||
|
|
||||||
public FieldReference FieldReference {
|
public FieldReference FieldReference {
|
||||||
get { return fieldRef; }
|
get { return fieldRef; }
|
||||||
|
@ -209,7 +255,7 @@ namespace de4dot.blocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MethodReferenceAndDeclaringTypeKey {
|
public class MethodReferenceAndDeclaringTypeKey {
|
||||||
MethodReference methodRef;
|
readonly MethodReference methodRef;
|
||||||
|
|
||||||
public MethodReference MethodReference {
|
public MethodReference MethodReference {
|
||||||
get { return methodRef; }
|
get { return methodRef; }
|
||||||
|
@ -296,7 +342,7 @@ namespace de4dot.blocks {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool compareScope(IMetadataScope a, IMetadataScope b) {
|
public static bool compareScope(IMetadataScope a, IMetadataScope b) {
|
||||||
if (ReferenceEquals(a, b))
|
if (ReferenceEquals(a, b))
|
||||||
return true;
|
return true;
|
||||||
if (a == null || b == null)
|
if (a == null || b == null)
|
||||||
|
@ -304,7 +350,7 @@ namespace de4dot.blocks {
|
||||||
return getCanonicalizedScopeName(a) == getCanonicalizedScopeName(b);
|
return getCanonicalizedScopeName(a) == getCanonicalizedScopeName(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int scopeHashCode(IMetadataScope a) {
|
public static int scopeHashCode(IMetadataScope a) {
|
||||||
if (a == null)
|
if (a == null)
|
||||||
return 0;
|
return 0;
|
||||||
return getCanonicalizedScopeName(a).GetHashCode();
|
return getCanonicalizedScopeName(a).GetHashCode();
|
||||||
|
|
|
@ -190,11 +190,12 @@ namespace de4dot.renamer {
|
||||||
|
|
||||||
void findAllMemberReferences() {
|
void findAllMemberReferences() {
|
||||||
Log.v("Finding all MemberReferences");
|
Log.v("Finding all MemberReferences");
|
||||||
|
int index = 0;
|
||||||
foreach (var module in modules) {
|
foreach (var module in modules) {
|
||||||
if (modules.Count > 1)
|
if (modules.Count > 1)
|
||||||
Log.v("Finding all MemberReferences ({0})", module.Filename);
|
Log.v("Finding all MemberReferences ({0})", module.Filename);
|
||||||
Log.indent();
|
Log.indent();
|
||||||
module.findAllMemberReferences();
|
module.findAllMemberReferences(ref index);
|
||||||
Log.deIndent();
|
Log.deIndent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,11 +289,11 @@ namespace de4dot.renamer {
|
||||||
public Module module;
|
public Module module;
|
||||||
string newNamespace = null;
|
string newNamespace = null;
|
||||||
|
|
||||||
DefDict<EventDef> events = new DefDict<EventDef>();
|
EventDefDict events = new EventDefDict();
|
||||||
DefDict<FieldDef> fields = new DefDict<FieldDef>();
|
FieldDefDict fields = new FieldDefDict();
|
||||||
DefDict<MethodDef> methods = new DefDict<MethodDef>();
|
MethodDefDict methods = new MethodDefDict();
|
||||||
DefDict<PropertyDef> properties = new DefDict<PropertyDef>();
|
PropertyDefDict properties = new PropertyDefDict();
|
||||||
DefDict<TypeDef> types = new DefDict<TypeDef>();
|
TypeDefDict types = new TypeDefDict();
|
||||||
IList<GenericParamDef> genericParams;
|
IList<GenericParamDef> genericParams;
|
||||||
public TypeDefinition TypeDefinition {
|
public TypeDefinition TypeDefinition {
|
||||||
get { return (TypeDefinition)MemberReference; }
|
get { return (TypeDefinition)MemberReference; }
|
||||||
|
@ -316,11 +316,6 @@ namespace de4dot.renamer {
|
||||||
: base(typeDefinition, null, index) {
|
: base(typeDefinition, null, index) {
|
||||||
this.module = module;
|
this.module = module;
|
||||||
genericParams = createGenericParamDefList(TypeDefinition.GenericParameters);
|
genericParams = createGenericParamDefList(TypeDefinition.GenericParameters);
|
||||||
|
|
||||||
fields.HandleDupe = (newOne, oldOne) => {
|
|
||||||
if (oldOne.FieldDefinition.IsLiteral && !newOne.FieldDefinition.IsLiteral)
|
|
||||||
fields.replaceOldWithNew(oldOne, newOne);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool isSame(MemberReference mr) {
|
public override bool isSame(MemberReference mr) {
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Mono.Cecil;
|
using Mono.Cecil;
|
||||||
|
using de4dot.blocks;
|
||||||
|
|
||||||
namespace de4dot.renamer {
|
namespace de4dot.renamer {
|
||||||
interface IResolver {
|
interface IResolver {
|
||||||
|
@ -34,39 +35,23 @@ namespace de4dot.renamer {
|
||||||
EventDef findEvent(MethodReference methodReference);
|
EventDef findEvent(MethodReference methodReference);
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyDict<T> {
|
interface RefDict<TRef, TMRef> where TRef : Ref where TMRef : MemberReference {
|
||||||
Dictionary<string, T> dict = new Dictionary<string, T>(StringComparer.Ordinal);
|
IEnumerable<TRef> getAll();
|
||||||
public T this[string key] {
|
IEnumerable<TRef> getSorted();
|
||||||
get {
|
TRef find(TMRef tmref);
|
||||||
T t;
|
void add(TRef tref);
|
||||||
if (dict.TryGetValue(key, out t))
|
|
||||||
return t;
|
|
||||||
return default(T);
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
dict[key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<T> getAll() {
|
|
||||||
foreach (var elem in dict.Values)
|
|
||||||
yield return elem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class DefDict<T> where T : Ref {
|
class TypeDefDict : RefDict<TypeDef, TypeReference> {
|
||||||
MyDict<IList<T>> dict = new MyDict<IList<T>>();
|
Dictionary<ScopeAndTokenKey, TypeDef> tokenToTypeDef = new Dictionary<ScopeAndTokenKey, TypeDef>();
|
||||||
public Action<T, T> HandleDupe { get; set; }
|
Dictionary<TypeReferenceKey, TypeDef> typeRefToDef = new Dictionary<TypeReferenceKey, TypeDef>();
|
||||||
|
|
||||||
public IEnumerable<T> getAll() {
|
public IEnumerable<TypeDef> getAll() {
|
||||||
foreach (var list in dict.getAll()) {
|
return tokenToTypeDef.Values;
|
||||||
foreach (var t in list)
|
|
||||||
yield return t;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<T> getSorted() {
|
public IEnumerable<TypeDef> getSorted() {
|
||||||
var list = new List<T>(getAll());
|
var list = new List<TypeDef>(getAll());
|
||||||
list.Sort((a, b) => {
|
list.Sort((a, b) => {
|
||||||
if (a.Index < b.Index) return -1;
|
if (a.Index < b.Index) return -1;
|
||||||
if (a.Index > b.Index) return 1;
|
if (a.Index > b.Index) return 1;
|
||||||
|
@ -75,46 +60,140 @@ namespace de4dot.renamer {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public T find(MemberReference mr) {
|
public TypeDef find(TypeReference typeReference) {
|
||||||
var list = dict[mr.Name];
|
TypeDef typeDef;
|
||||||
if (list == null)
|
if (tokenToTypeDef.TryGetValue(new ScopeAndTokenKey(typeReference), out typeDef))
|
||||||
return null;
|
return typeDef;
|
||||||
|
|
||||||
foreach (T t in list) {
|
typeRefToDef.TryGetValue(new TypeReferenceKey(typeReference), out typeDef);
|
||||||
if (t.isSame(mr))
|
return typeDef;
|
||||||
return t;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(T t) {
|
public void add(TypeDef typeDef) {
|
||||||
var other = find(t.MemberReference);
|
tokenToTypeDef[new ScopeAndTokenKey(typeDef.TypeDefinition)] = typeDef;
|
||||||
if (other != null) {
|
typeRefToDef[new TypeReferenceKey(typeDef.TypeDefinition)] = typeDef;
|
||||||
handleDupe(t, other);
|
}
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var list = dict[t.MemberReference.Name];
|
class FieldDefDict : RefDict<FieldDef, FieldReference> {
|
||||||
if (list == null)
|
Dictionary<ScopeAndTokenKey, FieldDef> tokenToFieldDef = new Dictionary<ScopeAndTokenKey, FieldDef>();
|
||||||
dict[t.MemberReference.Name] = list = new List<T>();
|
Dictionary<FieldReferenceKey, FieldDef> fieldRefToDef = new Dictionary<FieldReferenceKey, FieldDef>();
|
||||||
list.Add(t);
|
|
||||||
return;
|
public IEnumerable<FieldDef> getAll() {
|
||||||
|
return tokenToFieldDef.Values;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replaceOldWithNew(T oldOne, T newOne) {
|
public IEnumerable<FieldDef> getSorted() {
|
||||||
if (find(newOne.MemberReference) != oldOne)
|
var list = new List<FieldDef>(getAll());
|
||||||
throw new ApplicationException("Not same member reference");
|
list.Sort((a, b) => {
|
||||||
|
if (a.Index < b.Index) return -1;
|
||||||
var list = dict[oldOne.MemberReference.Name];
|
if (a.Index > b.Index) return 1;
|
||||||
if (!list.Remove(oldOne))
|
return 0;
|
||||||
throw new ApplicationException("Could not remove old one");
|
});
|
||||||
list.Add(newOne);
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleDupe(T newOne, T oldOne) {
|
public FieldDef find(FieldReference fieldReference) {
|
||||||
Log.v("Duplicate MemberReference found: {0} ({1:X8} vs {2:X8})", newOne.MemberReference, newOne.MemberReference.MetadataToken.ToUInt32(), oldOne.MemberReference.MetadataToken.ToUInt32());
|
FieldDef fieldDef;
|
||||||
if (HandleDupe != null)
|
if (tokenToFieldDef.TryGetValue(new ScopeAndTokenKey(fieldReference), out fieldDef))
|
||||||
HandleDupe(newOne, oldOne);
|
return fieldDef;
|
||||||
|
|
||||||
|
fieldRefToDef.TryGetValue(new FieldReferenceKey(fieldReference), out fieldDef);
|
||||||
|
return fieldDef;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(FieldDef fieldDef) {
|
||||||
|
tokenToFieldDef[new ScopeAndTokenKey(fieldDef.FieldDefinition)] = fieldDef;
|
||||||
|
fieldRefToDef[new FieldReferenceKey(fieldDef.FieldDefinition)] = fieldDef;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MethodDefDict : RefDict<MethodDef, MethodReference> {
|
||||||
|
Dictionary<ScopeAndTokenKey, MethodDef> tokenToMethodDef = new Dictionary<ScopeAndTokenKey, MethodDef>();
|
||||||
|
Dictionary<MethodReferenceKey, MethodDef> methodRefToDef = new Dictionary<MethodReferenceKey, MethodDef>();
|
||||||
|
|
||||||
|
public IEnumerable<MethodDef> getAll() {
|
||||||
|
return tokenToMethodDef.Values;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<MethodDef> getSorted() {
|
||||||
|
var list = new List<MethodDef>(getAll());
|
||||||
|
list.Sort((a, b) => {
|
||||||
|
if (a.Index < b.Index) return -1;
|
||||||
|
if (a.Index > b.Index) return 1;
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MethodDef find(MethodReference methodReference) {
|
||||||
|
MethodDef methodDef;
|
||||||
|
if (tokenToMethodDef.TryGetValue(new ScopeAndTokenKey(methodReference), out methodDef))
|
||||||
|
return methodDef;
|
||||||
|
|
||||||
|
methodRefToDef.TryGetValue(new MethodReferenceKey(methodReference), out methodDef);
|
||||||
|
return methodDef;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(MethodDef methodDef) {
|
||||||
|
tokenToMethodDef[new ScopeAndTokenKey(methodDef.MethodDefinition)] = methodDef;
|
||||||
|
methodRefToDef[new MethodReferenceKey(methodDef.MethodDefinition)] = methodDef;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PropertyDefDict : RefDict<PropertyDef, PropertyReference> {
|
||||||
|
Dictionary<ScopeAndTokenKey, PropertyDef> tokenToPropDef = new Dictionary<ScopeAndTokenKey, PropertyDef>();
|
||||||
|
|
||||||
|
public IEnumerable<PropertyDef> getAll() {
|
||||||
|
return tokenToPropDef.Values;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<PropertyDef> getSorted() {
|
||||||
|
var list = new List<PropertyDef>(getAll());
|
||||||
|
list.Sort((a, b) => {
|
||||||
|
if (a.Index < b.Index) return -1;
|
||||||
|
if (a.Index > b.Index) return 1;
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PropertyDef find(PropertyReference propertyReference) {
|
||||||
|
PropertyDef propDef;
|
||||||
|
tokenToPropDef.TryGetValue(new ScopeAndTokenKey(propertyReference), out propDef);
|
||||||
|
return propDef;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(PropertyDef propDef) {
|
||||||
|
tokenToPropDef[new ScopeAndTokenKey(propDef.PropertyDefinition)] = propDef;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EventDefDict : RefDict<EventDef, EventReference> {
|
||||||
|
Dictionary<ScopeAndTokenKey, EventDef> tokenToEventDef = new Dictionary<ScopeAndTokenKey, EventDef>();
|
||||||
|
|
||||||
|
public IEnumerable<EventDef> getAll() {
|
||||||
|
return tokenToEventDef.Values;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<EventDef> getSorted() {
|
||||||
|
var list = new List<EventDef>(getAll());
|
||||||
|
list.Sort((a, b) => {
|
||||||
|
if (a.Index < b.Index) return -1;
|
||||||
|
if (a.Index > b.Index) return 1;
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EventDef find(EventReference eventReference) {
|
||||||
|
EventDef propDef;
|
||||||
|
tokenToEventDef.TryGetValue(new ScopeAndTokenKey(eventReference), out propDef);
|
||||||
|
return propDef;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(EventDef eventDef) {
|
||||||
|
tokenToEventDef[new ScopeAndTokenKey(eventDef.EventDefinition)] = eventDef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace de4dot.renamer {
|
||||||
class Module : IResolver {
|
class Module : IResolver {
|
||||||
IObfuscatedFile obfuscatedFile;
|
IObfuscatedFile obfuscatedFile;
|
||||||
MemberRefFinder memberRefFinder;
|
MemberRefFinder memberRefFinder;
|
||||||
DefDict<TypeDef> allTypes = new DefDict<TypeDef>();
|
TypeDefDict allTypes = new TypeDefDict();
|
||||||
IList<RefToDef<TypeReference, TypeDefinition>> typeRefsToRename = new List<RefToDef<TypeReference, TypeDefinition>>();
|
IList<RefToDef<TypeReference, TypeDefinition>> typeRefsToRename = new List<RefToDef<TypeReference, TypeDefinition>>();
|
||||||
IList<RefToDef<MethodReference, MethodDefinition>> methodRefsToRename = new List<RefToDef<MethodReference, MethodDefinition>>();
|
IList<RefToDef<MethodReference, MethodDefinition>> methodRefsToRename = new List<RefToDef<MethodReference, MethodDefinition>>();
|
||||||
IList<RefToDef<FieldReference, FieldDefinition>> fieldRefsToRename = new List<RefToDef<FieldReference, FieldDefinition>>();
|
IList<RefToDef<FieldReference, FieldDefinition>> fieldRefsToRename = new List<RefToDef<FieldReference, FieldDefinition>>();
|
||||||
|
@ -187,7 +187,7 @@ namespace de4dot.renamer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void findAllMemberReferences() {
|
public void findAllMemberReferences(ref int typeIndex) {
|
||||||
memberRefFinder = new MemberRefFinder();
|
memberRefFinder = new MemberRefFinder();
|
||||||
memberRefFinder.findAll(ModuleDefinition, ModuleDefinition.Types);
|
memberRefFinder.findAll(ModuleDefinition, ModuleDefinition.Types);
|
||||||
allMethods = new List<MethodDefinition>(memberRefFinder.methodDefinitions.Keys);
|
allMethods = new List<MethodDefinition>(memberRefFinder.methodDefinitions.Keys);
|
||||||
|
@ -195,7 +195,7 @@ namespace de4dot.renamer {
|
||||||
var allTypesList = new List<TypeDef>();
|
var allTypesList = new List<TypeDef>();
|
||||||
foreach (var type in new List<TypeDefinition>(memberRefFinder.typeDefinitions.Keys)) {
|
foreach (var type in new List<TypeDefinition>(memberRefFinder.typeDefinitions.Keys)) {
|
||||||
memberRefFinder.removeTypeDefinition(type);
|
memberRefFinder.removeTypeDefinition(type);
|
||||||
var typeDef = new TypeDef(type, this);
|
var typeDef = new TypeDef(type, this, typeIndex++);
|
||||||
allTypes.add(typeDef);
|
allTypes.add(typeDef);
|
||||||
allTypesList.Add(typeDef);
|
allTypesList.Add(typeDef);
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ namespace de4dot.renamer {
|
||||||
}
|
}
|
||||||
|
|
||||||
void rebuildAllTypesDict() {
|
void rebuildAllTypesDict() {
|
||||||
var newAllTypes = new DefDict<TypeDef>();
|
var newAllTypes = new TypeDefDict();
|
||||||
foreach (var typeDef in allTypes.getAll())
|
foreach (var typeDef in allTypes.getAll())
|
||||||
newAllTypes.add(typeDef);
|
newAllTypes.add(typeDef);
|
||||||
allTypes = newAllTypes;
|
allTypes = newAllTypes;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user