/// <summary> /// Executes the feather on the specified module. /// </summary> /// <param name="module">The <see cref="ModuleDefinition" /> to feather.</param> /// <param name="assemblyFilePath">The path to the assembly that contains <paramref name="module"/>.</param> public void Execute(ModuleDefinition module, string assemblyFilePath) { var runner = new NpcInjectionRunner(module, this.callback); var types = from type in module.EnumerateTypes().AsParallel() where type.IsClass && HasNpcAttribute(type) select type; foreach (var type in types) { runner.ProcessType(type); } }
/// <summary> /// Executes the feather on the specified module. /// </summary> /// <param name="module">The <see cref="ModuleDefinition" /> to feather.</param> /// <param name="assemblyFilePath">The path to the assembly that contains <paramref name="module" />.</param> public void Execute(ModuleDefinition module, string assemblyFilePath) { var runner = new LogInjectionRunner(module, this.callback); var types = from type in module.EnumerateTypes().AsParallel() where type.HasFeatherAttribute(FeatherAction.Log) || type.IsNested && type.DeclaringType.HasFeatherAttribute(FeatherAction.Log) select type; foreach (var type in types) { runner.ProcessType(type); } }