Decompiled source of Batman AGD Modding SDK v1.1.0

BatmanDumper.dll

Decompiled 7 months ago
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;

[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[BepInPlugin("com.batman.agd.dumper", "AGD Ultra-Deep Dumper", "1.3.0")]
public class BatmanDumper : BaseUnityPlugin
{
	private void Start()
	{
		string path = Path.Combine(Paths.BepInExRootPath, "AGD_ULTRA_SDK.txt");
		using (StreamWriter streamWriter = new StreamWriter(path))
		{
			streamWriter.WriteLine("=== AGD ULTIMATE SDK - BY BATMAN ===");
			Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
			foreach (Assembly assembly in assemblies)
			{
				string name = assembly.GetName().Name;
				if (!(name == "AGD") && !(name == "Assembly-CSharp"))
				{
					continue;
				}
				streamWriter.WriteLine("\n>>> ARCHITECTURE : " + name + " <<<");
				Type[] types = assembly.GetTypes();
				foreach (Type type in types)
				{
					streamWriter.WriteLine("\n[CLASSE] " + type.FullName);
					FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
					FieldInfo[] array = fields;
					foreach (FieldInfo fieldInfo in array)
					{
						streamWriter.WriteLine("  - Var: " + fieldInfo.FieldType.Name + " " + fieldInfo.Name);
					}
					MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
					MethodInfo[] array2 = methods;
					foreach (MethodInfo methodInfo in array2)
					{
						string[] value = (from p in methodInfo.GetParameters()
							select p.ParameterType.Name + " " + p.Name).ToArray();
						string text = string.Join(", ", value);
						streamWriter.WriteLine("  - Meth: " + methodInfo.ReturnType.Name + " " + methodInfo.Name + "(" + text + ")");
					}
				}
			}
		}
		((BaseUnityPlugin)this).Logger.LogFatal((object)"BRAQUAGE TERMINE : AGD_ULTRA_SDK.txt cree !");
	}
}