Comment puis-je savoir si une instance est un proxy MarshalByRef?
-
20-09-2019 - |
Question
Je sais qu'il ya une certaine façon, je sais que je l'ai fait (depuis longtemps), mais je ne me souviens pas ou savoir comment le faire !!!
var otherDomain = AppDomain.Create("Lol my memory sucks");
var myRemotableType = typeof(MyTypeThatExtendsMBRO);
var proxy = otherDomain
.CreateInstanceAndUnwrap(
type.Assembly.FullName,
type.FullName);
// how do you do this next step???
bool isProxy = IsYouIsOrIsYouAintAProxy(proxy);
La solution
Je pense que vous êtes à la recherche de la RemotingServices.IsTransparentProxy()
.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow