SharpCrafters Forum – Customize a product with PostSharp?

SharpCrafters Support Forum

        


Customize a product with PostSharp? Expand / Collapse
Author
Message
Posted 6/25/2009 11:01:49 PM


Community Member
I'm building a web store with an off the shelf solution.  I'd like to customize it without having to modify aspx.cs files all over the place if I don't have to.  I'd like to wrap a method call ( Basket.Save() for example ) so I can do custom work before saving.  Can I use PostSharp to compile this into their existing DLL or use the PostSharp API to programmatically replace the Save() method with a delegate that calls my code first and then the original method?  
I've tried aspectdng which almost got me there but I think it wasn't up to .NET 3.5 or it bonked because the code was obfuscated.
Post #524
Posted 6/26/2009 2:41:42 AM


Gael Fraiteur

SharpCrafters
No, this is not possible currently using PostSharp Laos.

Using PostSharp Core, it's possible, but more complex (you need to write an IAnnotationProvider), so it's probably overkill if you are an "end-user programmer".

-gael
Post #525
« Prev Topic | Next Topic »


All times are GMT +1:00, Time now is 10:03pm

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.168. 9 queries. Compression Disabled.