Wiki

Clone wiki

GoingPostal / Catalogue

Contracts Killer

Out of the box

Type Description
NotNullAttribute Apply to a parameter to throw ArgumentNullException for a null value.
NullableAttribute Apply to a parameter to block the multicasting of NotNullAttribute to a parameter by NotNullReferenceParameterPolicyAttribute or StringParameterPolicyAttribute.
NotNullReferenceParameterPolicyAttribute Multicasts the NotNullAttribute aspect using standard PostSharp mechanisms.
StringNotNullOrEmptyAttribute Apply to a parameter to throw ArgumentException for a null or empty string value.
StringNotNullOrWhiteSpaceAttribute Apply to a parameter to throw ArgumentException for a null or empty string value.
StringParameterPolicy The enum defining the different aspects that StringParameterPolicyAttribute will multicast.
StringParameterPolicyAttribute Multicasts the appropriate aspect - NotNullAttribute StringNotNullOrEmptyAttribute or StringNotNullOrWhiteSpaceAttribute - as specified by the Policy property - using standard PostSharp mechanisms.

For aspect developers

Type Description
ParameterMulticastAttribute Abstract base class for writing your own multicaster for parameter aspects. Pierces the method boundary in PostSharp multicasting.

Going Postal

Type Description
AutoDisposeAttribute Apply to a class to implement the dispose pattern. Allowed once per class hierarchy.
AutoDisposeDescendentAttribute Apply to subclasses of a disposable type to implement the dispose pattern.
AutoDisposeMemberAttribute Add to members where necessary to control the order of disposal or exclude a member from disposal when using AutoDisposeAttribute or AutoDisposeDescendentAttribute
ThrowExceptionTargets A bit field enum used to specify which members will throw ObjectDisposedException after an object has been disposed.
ThrowObjectDisposedAttribute Add to a member to override the behavior added by AutoDisposeAttribute or AutoDisposeDescendentAttribute
UnhookEventsAttribute Apply to a class add a method that removes all handlers from all events in that class. NB this functionality is also added by the AutoDisposeAttribute or AutoDisposeDescendentAttribute aspects.

Updated