Thanks to the JIT, references are only loaded into memory once required. Here’s how to access them before they are required:
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += (sender, resolveArgs) => Assembly.ReflectionOnlyLoad(resolveArgs.Name);
var types = Assembly.ReflectionOnlyLoad("DllNameGoesHere").GetExportedTypes();
No comments:
Post a Comment