Ejemplo n.º 1
0
        public void ApplyInjection(SR.Assembly injectionAssembly, SR.Assembly targetAssembly, Stream assemblyWriteStream)
        {
            var targetPath = targetAssembly.GetAssemblyPath();
            _targetModule = ModuleDefinition.ReadModule(targetPath);
            _injectionModule = ModuleDefinition.ReadModule(injectionAssembly.GetAssemblyPath());

            var injectees = GetInjectees(targetAssembly, injectionAssembly);
            ApplyInjectees(injectees);

            _targetModule.Assembly.Write(assemblyWriteStream);
        }