Hi,
is it possible to use custom context-attributes with serviced components?
[AttributeUsage(AttributeTargets.Class)]
public class Logging : ContextAttribute
{
public Logging() {...}
public override void GetPropertiesForNewContext(IConstructionCallMessag e ctorMsg) {...}
}
[Logging]
public class LogMe : ServicedComponent
{
}
The attribute-instance itself is created, but GetPropertiesForNewContext
isn't called (which happens when i use the same attribute, but derive my
LogMe-Class from ContextBoundObject).
Precisely my question should have been: Is it possible to use
ContextAttributes with ServicedComponents to intercept function calls?
(ContextAttribute, IContextProperty, IMessageSink)
Our plan is to optimize our application architecture by introducing a kind
of aspect orientation. we've succeeded in intercepting function calls as
described in MSDN
Because some of our programs depend on EnterpriseServices we're now
evaluating the above mentioned technique for ServicedComponents. Does anyone know if it is possible?
Thanks for any help,
Lucas