c# – 检测透明代理与实际对象引用?
发布时间:2020-12-15 08:14:18 所属栏目:百科 来源:网络整理
导读:给定一个对象引用,是否可以以编程方式确定对象是在当前appdomain中创建的,还是代理另一个appdomain中的对象? 解决方法 请尝试以下方法 var isProxy = RemotingServices.IsTransparentProxy(obj); System.Runtime.Remoting.RemotingServices.IsTransparentPr
给定一个对象引用,是否可以以编程方式确定对象是在当前appdomain中创建的,还是代理另一个appdomain中的对象?
解决方法
请尝试以下方法
var isProxy = RemotingServices.IsTransparentProxy(obj); System.Runtime.Remoting.RemotingServices.IsTransparentProxy (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |