Contracts and Types supported?

gregg.gianopulos's Avatar

gregg.gianopulos

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

    Hello,

    each code contract is documented in the API documentation of the PostSharp.Patterns.Contracts namespace at http://doc.postsharp.net/n_postsharp_patterns_contracts.

    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,
    -tony

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

    PostSharp Technologies's Avatar

    Hello,

    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.

    Thanks,
    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

Generic

? 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