开发者

How can I find out if an instance is a MarshalByRef proxy?

I know there's a way, I know I've done it (a long time) before, but I can't remember or find out how to do it!!!

var otherDomain = AppDomain.Create("Lol my memory sucks");
var myRemotableType = typeof(MyTypeThatExtendsMBRO);
var pr开发者_如何转开发oxy = otherDomain
    .CreateInstanceAndUnwrap(
      type.Assembly.FullName, 
      type.FullName);
// how do you do this next step???
bool isProxy = IsYouIsOrIsYouAintAProxy(proxy);


I think that you are looking for the RemotingServices.IsTransparentProxy() method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜