JCooney.NET

Joseph Cooney's Weblog

My Links

Blog Stats

News

I work for:


see also:
Dominic Cooney
Patrick Cooney

Archives

Image Galleries

My GotDotNet Samples

Web Syncronicity

The web has a nice way of bringing things around full circle (or my brain notices co-incidences and attaches “meaning” to them). I played around late last week writing some custom attributes. I was interested in doing some method interception, and also maybe subscribing to some events on the decorated class. It seems that writing a custom attribute that actually DOES something by its self (rather than just being a piece of meta-data that can be queried reflectively by some other bit of code) is somewhat hard. If you inherit from ProxyAttribute and are applied to a ContextBoundObject object you can “do stuff” but apart from that it seems like you're out of luck. Even passing the current instance as a constructor argument to your attribute (so you could hook in to events and the like) doesn't work either (if anybody knows different please let me know). Somewhat disheartened I fired up IronPython to have a very belated play around with that. IronPython is cool, and I certainly plan to figure out how to add a “python interactive console” to winforms apps. Next thing I did (somewhat out of the blue) was check Jon Lam's site IUnknown.com. I had been talking to somebody about the IUnknown COM interface a couple of days before and it had reminded me of Jon's site - what do you think I found there? Some code on method interception written in Python.

posted on Sunday, September 26, 2004 4:50 PM

Feedback

# re: Introducing the Osherove.Interception framework 10/12/2004 7:49 PM ISerializable

# re: Web Syncronicity 11/8/2004 11:08 PM DAN PALMER

Maybe I am being thick but isn’t the internet and modern technology all about logic and common association? I mean without that it wouldn’t work right? Every thing is interconnected Or else people would have to spend lifetimes writing code that resulted in just a pages of produce. All that time tapping out 1s and 0s. 110011011

# Attributes - A feature suggestion for Orcas and beyond 7/20/2005 1:54 PM JCooney.NET

# Attributes - A feature suggestion for Orcas and beyond 7/20/2005 1:55 PM JCooney.NET

Title  
Name  
Url
Security Word (prevent comment spam)
Protected by FormShield
Comments