Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

object traps

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Rivers - 01 Mar 2008 23:38 GMT
hi

does anybody know of a way to detect all accesses to an object
including
method or property entry and exit
instance or static field read and write etc.

this would be very useful during debugging but also at runtime

imagine being able to implement an event handler for every write to a
field etc.

tools like speedtrace get very close to what I want

http://www.ipcas.com/trace-and-profile/c-sharp-and-vb.net-tracer-and-profiler

but I want access to that type of information from within my
application

john
Sergey Zyuzin - 02 Mar 2008 12:41 GMT
> hi
>
[quoted text clipped - 16 lines]
>
> john

Hi John,

I think what you describe can be solved with Aspect Oriented
Programming. There are some sorts of AOP implementations for .NET,
like Spring .Net framework for example.(http://www.springframework.net/
doc-latest/reference/html/aop-quickstart.html)

In .NET you can use ContextBoundObjects to handle calls to methods and
properties.
Here's an article about this: http://www.codeproject.com/KB/cs/aspectintercept.aspx

HTH,
Sergey
John Rivers - 04 Mar 2008 09:52 GMT
> > hi
>
[quoted text clipped - 30 lines]
> HTH,
> Sergey

Thanks Sergey

that CodeProject article seems to do exactly what I need

now I just have to understand it completely before I use it for real

I read a bit on the Spring.net aspect oriented programming - there are
some big ideas
in there .. maybe too big for me *-)

Thanks again

John

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.