MetalamaAPI documentationPatterns APIMetalama.​Patterns.​ContractsContract­Base­Attribute
Open sandboxFocus

ContractBaseAttribute Class

A base class for all contracts defined in this library.

Namespace: Metalama.Patterns.Contracts
Assembly: Metalama.Patterns.Contracts.dll
Syntax
public abstract class ContractBaseAttribute : ContractAspect, IAspect<IParameter>, IEligible<IParameter>, IAspect<IFieldOrPropertyOrIndexer>, IEligible<IFieldOrPropertyOrIndexer>, IConditionallyInheritableAspect, IAspect, ICompileTimeSerializable, ITemplateProvider

Constructors

Name Description
ContractBaseAttribute()

Properties

Name Description
Direction

Gets or sets the direction of the contract. When this property is not set, its default value is read from ContractOptions. When no value is defined in ContractOptions, the default value of this property is Default.

IsInheritable

Gets or sets a value indicating whether this contract should be inherited to derived types or overriding members. When this property is not set, its default value is read from ContractOptions. When no value is defined in ContractOptions, the default value of this property is true.

Methods

Name Description
GetActualDirection(IAspectBuilder, ContractDirection)
GetDefinedDirection(IAspectBuilder)

Explicit Interface Implementations

Name Description
IConditionallyInheritableAspect.IsInheritable(IDeclaration, IAspectInstance)