是否可以在运行时创建绑定重定向? [英] Is it possible to create a binding redirect at runtime?

查看:76
本文介绍了是否可以在运行时创建绑定重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦启动了应用程序,是否可以创建一种绑定重定向,该重定向将应用于将来的所有程序集加载?

Once an application has started is there a way to create a binding redirect that will apply to all future assembly loads?

推荐答案

使用ICLRHostBindingPolicyManager :: ModifyApplicationPolicy可以 ,但我从未尝试过.请注意,这是CLR级别的接口,因此您无法为单个AppDomain加载策略(这就是为什么PostSharp尚未使用它的原因).

It could be possible using ICLRHostBindingPolicyManager::ModifyApplicationPolicy, but I've never tried myself. Note that this is a CLR-level interface, so you can't load policies for individual AppDomains (which is why it is not used by PostSharp yet).

http://msdn.microsoft.com/en-us/library/ms164378.aspx

这篇关于是否可以在运行时创建绑定重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆