473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

object traps

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-profi...r-and-profiler

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

john
Mar 1 '08 #1
2 1071
On 2 อมา, 01:38, John Rivers <firs...@btinternet.comwrote:
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-profi...et-tracer-and-...

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

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
Mar 2 '08 #2
On Mar 2, 12:41 pm, Sergey Zyuzin <forever....@gmail.comwrote:
On 2 อมา, 01:38, John Rivers <firs...@btinternet.comwrote:
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-profi...et-tracer-and-...
but I want access to that type of information from within my
application
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

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
Mar 4 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
by: yensao | last post by:
Hi, I have a hard time to understand difference and similarities between Relational database model and the Object-Oriented model. Can somebody help me with this? Thank you in advance. ...
4
by: Mark D. Anderson | last post by:
About a month ago Richard Cornford did an interesting analysis of a memory leak in jscript (internet explorer) when there are "circular" references between DOM objects and (real) jscript objects:...
4
by: serge | last post by:
I tried all the INFORMATION_SCHEMA on SQL 2000 and I see that the system tables hold pretty much everything I am interested in: Objects names (columns, functions, stored procedures, ...) stored...
3
by: ozbear | last post by:
This is probably an obvious question. I know that pointer comparisons are only defined if the two pointers point somewhere "into" the storage allocated to the same object, or if they are NULL,...
4
by: Jay | last post by:
Guess this has probably been reported already. Seems if you don't use {} with for/while etc., the debugger stops at the wrong line. In the example below, I had a breakpoint at line 6 but the...
1
by: hg | last post by:
Hi, I need to catch a signal "SIGUSR1" in an object ... and I need the signal def that traps is to access the object context ... is that possible ? (*nix and windows) ex: class test: def...
62
by: Laurent Deniau | last post by:
I just put the draft of my paper on the web: http://cern.ch/laurent.deniau/html/cos-oopsla07-draft.pdf I would be interested by any feedback from C programmers (with little OO knowledge) to...
1
by: idoha | last post by:
Hi All, I need to send SNMP traps of a very specific forma (version 2 snmp trap). The format is as following: 07/31/2007 16:31:47 2 172.21.49.66 172.21.49.66 1.3.6.1.4.1.6387.1.2.3.3.1.2.12 ...
1
by: Dirk Van de moortel | last post by:
{ OOPS, posted this to moderated group perl.cpan.discuss as well, so it can take a while to get through, if it gets through at all Otherwise sorry for duplicate posting } We need to set up a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.