Estoy utilizando el castillo DynamicProxy y me preguntaba si hay una forma de detectar si un tipo es un proxy sin hacer referencia a Castle DynamicProxy.¿Cómo detectar si un Tipo es un DynamicProxy generado sin hacer referencia a Castle DynamicProxy?
Así que mientras uso Castle DynamicProxy como ejemplo me gustaría un código que funcione para cualquier tipo de memoria generada.
var generator = new ProxyGenerator();
var classProxy = generator.CreateClassProxy<Hashtable>();
Debug.WriteLine(classProxy.GetType().Is....);
var interfaceProxy = generator.CreateInterfaceProxyWithoutTarget<ICollection>();
Debug.WriteLine(interfaceProxy.GetType().Is....);
Gracias
Como Ayende señaló http://groups.google.com/group/castle-project-users/browse_thread/thread/d1c3b4464aad6043 Ubicación lanzar una excepción es un efecto secundario. lo mismo ocurriría si usa Assembly.Load (File.ReadAllBytes ("Nhibernate.dll")); – Simon