Providing aspects on types of another project

gchaffarod's Avatar


24 Jan, 2018 03:13 PM


We're developing a specific API that uses postsharp to handle properties changes using a TypeLevelAspect.

In this API, we provide an abstract class that has a DateTime field named "lastModification". This abstract class is given the aspect.
When a property of an object of this abstract class is changed, we automatically change the lastModification field with the actual date.

The problem is that we provide this API to developers that can create third parties plugins and use this specific abstract class.
They should add a reference to our DLL and create a new class extending this abstract class with their custom properties. Any change of these custom properties should change the last modification date.
We need to ensure that this date is changed regardless of these developers coding.

How can we perform it ? Can our API call postsharp methods during compilation of these plugins ?

Thank you for your answer.

Best regards,


  1. Support Staff 1 Posted by PostSharp Techn... on 24 Jan, 2018 04:44 PM

    PostSharp Technologies's Avatar

    Hi Guillaume,

    This is possible. Technically, your users will need to reference the PostSharp package (not the redist one) and your aspect will then be applied on their types.
    But we need to address the licensing question. Let's organize a phone call. I'll send you a private email.


  2. Support Staff 2 Posted by PostSharp Techn... on 07 Feb, 2018 02:31 PM

    PostSharp Technologies's Avatar


    We are going to close this request as we believe it was solved. Please feel free to reopen the discussion if you need more help.

    Best regards,
    PostSharp Team

  3. PostSharp Technologies closed this discussion on 07 Feb, 2018 02:31 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac