What's new? | Help | Directory | Sign in
Google
postsharp-user-samples
PostSharp User Samples
  
  
  
  
    
Search
for
Updated Sep 21, 2007 by kreuzerg
FieldAccessAspect  
Demonstrates code injection on field level.

Introduction

A simple aspect is created, which reports read/write operation on fields.

Details

The class 'MyFieldAccessAspect contains the injected code. The class 'SomeBusinessObject' is decorated with the 'MyFieldAccessAspect' attribute, which advise the enhancer framework to intercept read/write operations of all fields in this class. Its also possible to decorate selected fields instead of decorating the class. This sample could be a starting point, adding tracing and/or metering functionality to your objects by declaration instead of writing code.


Comment by liviu.u, Jan 15, 2008

?


Sign in to add a comment