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.
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
public static class ContractServices
The ContractServices type exposes the following members.
Name | Description | |
---|---|---|
ExceptionFactory |
Gets the head of the ContractExceptionFactory responsibility chain.
| |
LocalizedTextProvider |
Gets the head of the ContractLocalizedTextProvider responsibility chain.
|