Open sandboxFocus

Class ContractServices

Provides services that support the contract aspects. By adding your own classes to the ExceptionFactory chain, you can change how exceptions are created when a contract is violated. By plugging into the LocalizedTextProvider chain, you can change how exception messages are generated. For more details, see the documentation of these classes: ContractLocalizedTextProvider, ContractExceptionFactory.

Inheritance
ContractServices
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common.dll
Syntax
public static class ContractServices

Properties

Name Description
ExceptionFactory

Gets or sets the head of the ContractExceptionFactory responsibility chain.

LocalizedTextProvider

Gets or sets the head of the ContractLocalizedTextProvider responsibility chain.

See Also