Confuser.Core/PluginDiscovery.cs
/// <summary>
///     Retrieves the available protection plugins.
/// </summary>
/// <param name="context">The working context.</param>
/// <param name="protections">The working list of protections.</param>
/// <param name="packers">The working list of packers.</param>
/// <param name="components">The working list of components.</param>
// Token: 0x060001D4 RID: 468 RVA: 0x0000F718 File Offset: 0x0000D918
Retrieves the available protection plugins.
Retrieves the available protection plugins .
protected virtual void GetPluginsInternal(ConfuserContext context, IList<Protection> protections, IList<Packer> packers, IList<ConfuserComponent> components)
		{
			try
			{
				Assembly protAsm = Assembly.Load("Confuser.Protections");
				PluginDiscovery.AddPlugins(context, protections, packers, components, protAsm);
			}
			catch (Exception ex)
			{
				context.Logger.WarnException("Failed to load built-in protections.", ex);
			}
			try
			{
				Assembly renameAsm = Assembly.Load("Confuser.Renamer");
				PluginDiscovery.AddPlugins(context, protections, packers, components, renameAsm);
			}
			catch (Exception ex2)
			{
				context.Logger.WarnException("Failed to load renamer.", ex2);
			}
			try
			{
				Assembly renameAsm2 = Assembly.Load("Confuser.DynCipher");
				PluginDiscovery.AddPlugins(context, protections, packers, components, renameAsm2);
			}
			catch (Exception ex3)
			{
				context.Logger.WarnException("Failed to load dynamic cipher library.", ex3);
			}
			foreach (string pluginPath in context.Project.PluginPaths)
			{
				string realPath = Path.Combine(context.BaseDirectory, pluginPath);
				try
				{
					Assembly plugin = Assembly.LoadFile(realPath);
					PluginDiscovery.AddPlugins(context, protections, packers, components, plugin);
				}
				catch (Exception ex4)
				{
					context.Logger.WarnException("Failed to load plugin '" + pluginPath + "'.", ex4);
				}
			}
		}
protected virtual void GetPluginsInternal ( ConfuserContext context , IList < Protection > protections , IList < Packer > packers , IList < ConfuserComponent > components ) { try { Assembly protAsm = Assembly . Load ( " " ) ; PluginDiscovery . AddPlugins ( context , protections , packers , components , protAsm ) ; } catch ( Exception ex ) { context . Logger . WarnException ( " " , ex ) ; } try { Assembly renameAsm = Assembly . Load ( " " ) ; PluginDiscovery . AddPlugins ( context , protections , packers , components , renameAsm ) ; } catch ( Exception ex2 ) { context . Logger . WarnException ( " " , ex2 ) ; } try { Assembly renameAsm2 = Assembly . Load ( " " ) ; PluginDiscovery . AddPlugins ( context , protections , packers , components , renameAsm2 ) ; } catch ( Exception ex3 ) { context . Logger . WarnException ( " " , ex3 ) ; } foreach ( string pluginPath in context . Project . PluginPaths ) { string realPath = Path . Combine ( context . BaseDirectory , pluginPath ) ; try { Assembly plugin = Assembly . LoadFile ( realPath ) ; PluginDiscovery . AddPlugins ( context , protections , packers , components , plugin ) ; } catch ( Exception ex4 ) { context . Logger . WarnException ( " " + pluginPath + " " , ex4 ) ; } } }
Retrieves the available protection plugins.
Retrieves the available protection plugins .
context
ConfuserContext
The working context.
The working context .
protections
IList<Protection>
The working list of protections.
The working list of protections .
packers
IList<Packer>
The working list of packers.
The working list of packers .
components
IList<ConfuserComponent>
The working list of components.
The working list of components .