Contracts and Types supported?

gregg.gianopulos's Avatar


18 May, 2018 03:29 PM

The documentation on Contracts is not great. There is no list of the data types supported?
For example, I see that [Required] supports null reference and null or empty strings, or ICollections. But I can't tell if [Required] or [NotEmpty] supports Guid types?
Where is this documented?

Is source code available for these default implementations?

  1. Support Staff 1 Posted by PostSharp Techn... on 21 May, 2018 09:09 AM

    PostSharp Technologies's Avatar


    each code contract is documented in the API documentation of the PostSharp.Patterns.Contracts namespace at

    Only the types mentioned in this documentation are handled in an individual manner. The other types are only checked for null value.

    The source code is not available at the moment.

    We do our best to make our documentation understandable. If you find any part of it confusing, please let us know.

    Is there anything else we can help you with?

    Best regards,

  2. Support Staff 2 Posted by PostSharp Techn... on 28 May, 2018 01:50 PM

    PostSharp Technologies's Avatar


    We are going to close this request as there have not been any further updates. Please feel free to reopen the discussion if you need more help.

    PostSharp Team

  3. PostSharp Technologies closed this discussion on 28 May, 2018 01:50 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