mirror of
https://github.com/LukeFZ/Il2CppInspectorRedux.git
synced 2025-12-14 23:39:40 +05:00
Model: Don't return duplicates or nulls in Model.Types
Prevents duplicates appearing in IDA Python script
This commit is contained in:
@@ -30,7 +30,8 @@ namespace Il2CppInspector.Reflection
|
|||||||
public ConcurrentDictionary<ulong, TypeInfo> TypesByVirtualAddress { get; } = new ConcurrentDictionary<ulong, TypeInfo>();
|
public ConcurrentDictionary<ulong, TypeInfo> TypesByVirtualAddress { get; } = new ConcurrentDictionary<ulong, TypeInfo>();
|
||||||
|
|
||||||
// Every type
|
// Every type
|
||||||
public IEnumerable<TypeInfo> Types => new IEnumerable<TypeInfo>[] {TypesByDefinitionIndex, TypesByReferenceIndex, TypesByVirtualAddress.Values}.SelectMany(t => t);
|
public IEnumerable<TypeInfo> Types => new IEnumerable<TypeInfo>[] {TypesByDefinitionIndex, TypesByReferenceIndex, TypesByVirtualAddress.Values}
|
||||||
|
.SelectMany(t => t).Where(t => t != null).Distinct();
|
||||||
|
|
||||||
// List of all methods ordered by their MethodDefinitionIndex
|
// List of all methods ordered by their MethodDefinitionIndex
|
||||||
public MethodBase[] MethodsByDefinitionIndex { get; }
|
public MethodBase[] MethodsByDefinitionIndex { get; }
|
||||||
|
|||||||
Reference in New Issue
Block a user