PostSharp6.4/API Reference/Post­Sharp.​Patterns.​Contracts Namespace/Contract­Services Class

ContractServices Class

This class provides services supporting Contract aspects. By adding your own classes to the ExceptionFactory chain, you can change the way the exceptions are created when a contract is broken. By plugging into the LocalizedTextProvider chain, you can change the way the exception messages are generated. See the documentation for the classes for more details: ContractLocalizedTextProvider, ContractExceptionFactory.
Inheritance Hierarchy
System.Object
  PostSharp.Patterns.Contracts.ContractServices

Namespace:  PostSharp.Patterns.Contracts
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.4.3.0 (6.4.3.0)
Syntax
C#
public static class ContractServices

The ContractServices type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberExceptionFactory
Gets the head of the ContractExceptionFactory responsibility chain.
Public propertyStatic memberLocalizedTextProvider
Gets the head of the ContractLocalizedTextProvider responsibility chain.
See Also