Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 2d8ae45

Browse files
committed
Cleanup
1 parent 66dc262 commit 2d8ae45

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

src/Core/Reflection/ReflectionUtility.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ private static void CacheTypes(Assembly asm)
8787
{
8888
foreach (var type in asm.TryGetTypes())
8989
{
90+
// Cache namespace if there is one
9091
if (!string.IsNullOrEmpty(type.Namespace) && !uniqueNamespaces.Contains(type.Namespace))
9192
{
9293
uniqueNamespaces.Add(type.Namespace);
@@ -100,16 +101,16 @@ private static void CacheTypes(Assembly asm)
100101
AllNamespaces.Insert(i, type.Namespace);
101102
}
102103

104+
// Cache the type. Overwrite type if one exists with the full name
103105
if (AllTypes.ContainsKey(type.FullName))
104106
AllTypes[type.FullName] = type;
105107
else
106-
{
107108
AllTypes.Add(type.FullName, type);
108-
//allTypeNames.Add(type.FullName);
109-
}
110109

110+
// Invoke listener
111111
OnTypeLoaded?.Invoke(type);
112112

113+
// Check type inheritance cache, add this to any lists it should be in
113114
foreach (var key in typeInheritance.Keys)
114115
{
115116
try
@@ -154,13 +155,6 @@ public static string ProcessTypeInString(Type type, string theString)
154155
internal virtual string Internal_ProcessTypeInString(string theString, Type type)
155156
=> theString;
156157

157-
//// Force loading modules
158-
//public static bool LoadModule(string moduleName)
159-
// => Instance.Internal_LoadModule(moduleName);
160-
//
161-
//internal virtual bool Internal_LoadModule(string moduleName)
162-
// => false;
163-
164158
// Singleton finder
165159

166160
public static void FindSingleton(string[] possibleNames, Type type, BindingFlags flags, List<object> instances)

src/Loader/BIE/BepInExConfigHandler.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ public override void Init()
2121

2222
public override void RegisterConfigElement<T>(ConfigElement<T> config)
2323
{
24-
object[] tags = null;
25-
if (config.IsInternal)
26-
tags = new[] { "Advanced" };
27-
28-
var entry = Config.Bind(CTG_NAME, config.Name, config.Value, new ConfigDescription(config.Description, null, tags));
24+
var entry = Config.Bind(CTG_NAME, config.Name, config.Value, config.Description);
2925

3026
entry.SettingChanged += (object o, EventArgs e) =>
3127
{

0 commit comments

Comments
 (0)