/// <summary> /// This is used to load an accessory assembly /// </summary> /// <param name="filePath">The path of the accessory assembly to load</param> public void LoadAccessoryAssembly(string filePath) { // This causes non-classes to register as classes AssemblyNode assembly = AssemblyNode.GetAssembly(filePath, null, false, false, false, false); if (assembly != null) { if (assembly.Name == "mscorlib") { ResetMscorlib(assembly); } resolver.Add(assembly); accessoryAssemblies.Add(assembly); } }
// Accessory modules //private IDictionary cache = new Hashtable(); public void LoadAccessoryAssembly(string filePath) { AssemblyNode assembly = AssemblyNode.GetAssembly(filePath, null, false, false, false, false); // this causes non-classes to register as classes if (assembly != null) { if (assembly.Name == "mscorlib") { ResetMscorlib(assembly); } resolver.Add(assembly); //assembly.AssemblyReferenceResolutionAfterProbingFailed += unresolvedModuleHandler; accessoryAssemblies.Add(assembly); } }
/// <summary> /// This is used to load an accessory assembly /// </summary> /// <param name="filePath">The path of the accessory assembly to load</param> public void LoadAccessoryAssembly(string filePath) { // This causes non-classes to register as classes AssemblyNode assembly = AssemblyNode.GetAssembly(filePath, null, false, false, false, false); if (assembly != null) { // Ignore these. We've identified the system types assembly already and the other two won't // contain any usable types. if (assembly.Name == "mscorlib" || assembly.Name == "netstandard" || assembly.Name == "System.Runtime") { return; } resolver.Add(assembly); accessoryAssemblies.Add(assembly); } }
/// <summary> /// This is used to load an accessory assembly /// </summary> /// <param name="filePath">The path of the accessory assembly to load</param> public void LoadAccessoryAssembly(string filePath) { // This causes non-classes to register as classes AssemblyNode assembly = AssemblyNode.GetAssembly(filePath, null, false, false, false, false); if (assembly != null) { // Do not reset for frameworks that redirect all mscorlib types to other assemblies or it results // in a stack overflow. if ((assembly.Name == "mscorlib" && !TargetPlatform.AllSystemTypesRedirected) || assembly.Name == "netstandard") { ResetMscorlib(assembly); } resolver.Add(assembly); accessoryAssemblies.Add(assembly); } }
/// <summary> /// This is used to load an accessory assembly /// </summary> /// <param name="filePath">The path of the accessory assembly to load</param> public void LoadAccessoryAssembly(string filePath) { // This causes non-classes to register as classes AssemblyNode assembly = AssemblyNode.GetAssembly(filePath, null, false, false, false, false); if (assembly != null) { // Do not reset for frameworks that redirect all mscorlib types to other assemblies or it results // in a stack overflow. if (assembly.Name == "mscorlib" && TargetPlatform.Platform != ".NETCore" && TargetPlatform.Platform != ".NETPortable" && TargetPlatform.Platform != "WindowsPhoneApp") { ResetMscorlib(assembly); } resolver.Add(assembly); accessoryAssemblies.Add(assembly); } }