I use Castle DynamicProxy to create a proxy of a certain type at runtime, including a pair of mixins.
I am trying to figure out whether it is possible to add arbitrary properties to the proxy, for example:
class BaseType
{
string Foo { get; set; }
}
and at runtime I create a new type that will look like this:
class BaseTypeProxy3848484etc
{
string Foo { get; set; }
OtherType Bar { get; set; }
}
In theory, it seems that this should be possible - maybe I just don’t see how to do this with the Castle ... Any thoughts? Thanks!
source
share