PostSharpAPI ReferencePost­Sharp.​Patterns.​ContractsContract­Services
Open sandboxFocus

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
ContractServices
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common.dll
Syntax
public static class ContractServices : Object

Properties

Name Description
ExceptionFactory

Gets the head of the ContractExceptionFactory responsibility chain.

LocalizedTextProvider

Gets the head of the ContractLocalizedTextProvider responsibility chain.