CS: Fix "Namespace used like type" (CS0118) (needs additional work)
This commit is contained in:
@@ -16,6 +16,9 @@ namespace Il2CppInspector.Reflection
|
||||
public Il2CppInspector Package { get; }
|
||||
public List<Assembly> Assemblies { get; } = new List<Assembly>();
|
||||
|
||||
// List of all namespaces defined by the application
|
||||
public List<string> Namespaces { get; }
|
||||
|
||||
// List of all types from TypeDefs ordered by their TypeDefinitionIndex
|
||||
public TypeInfo[] TypesByDefinitionIndex { get; }
|
||||
|
||||
@@ -113,6 +116,9 @@ namespace Il2CppInspector.Reflection
|
||||
GenericMethods[spec] = method;
|
||||
}
|
||||
|
||||
// Generate a list of all namespaces used
|
||||
Namespaces = Assemblies.SelectMany(x => x.DefinedTypes).GroupBy(t => t.Namespace).Select(n => n.Key).Distinct().ToList();
|
||||
|
||||
// Find all custom attribute generators (populate AttributesByIndices) (use ToList() to force evaluation)
|
||||
var allAssemblyAttributes = Assemblies.Select(a => a.CustomAttributes).ToList();
|
||||
var allTypeAttributes = TypesByDefinitionIndex.Select(t => t.CustomAttributes).ToList();
|
||||
|
||||
Reference in New Issue
Block a user