TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jeff Plummer
NA
2
0
Need help... Any ideas other than interception?
Jul 1 2008 3:24 PM
I have a problem very similar to the standard "logging" example in many interception tutorials...
I would like to allow people to decorate certain "setter" properties such than when it is called, an event is fired. I am pretty sure I could do this with interception, but I have been reading about various performance issues (similar performance issues as "Synchronized" attribute... And this is code that will be accessed quite often)
Ex:
[MySpecialAttribute theProperty="SomeProperty"]
int SomeProperty
{
get { return x;}
set { x = value;}
}
And the result of calling SomeObject.SomeProperty = 5 is
x = 5;
fireevent("SomeProperty was set");
I like the attribute/interception approach because I already have to decorate these properties with an attribute (although currently not a performance hurting context attribute), so it seemed pretty nice to just add some capability to that attribute to fire the event as well. But I don't want the performance hit related to "
ContextBoundObject"
. Any ideas?
Thanks in advance,
Jeff Plummer
Reply
Answers (
0
)
need to display only subquestions when itemcommand evenst fires.
Can't get Volume Name of memory card using WMI - help