Open sandboxFocus

Class ImmutableAttribute

An aspect that marks the target type as immutable (shallowly or deeply) and reports warnings for mutable fields.

Inheritance
ImmutableAttribute
Namespace: Metalama.Patterns.Immutability
Assembly: Metalama.Patterns.Immutability.dll
Syntax
[Inheritable]
public class ImmutableAttribute : TypeAspect, IAspect<INamedType>, IAspect, ICompileTimeSerializable, ITemplateProvider, IEligible<INamedType>, IHierarchicalOptionsProvider

Constructors

Name Description
ImmutableAttribute(ImmutabilityKind)

Initializes a new instance of the ImmutableAttribute class.

Methods

Name Description
BuildAspect(IAspectBuilder<INamedType>)

Initializes the aspect. The implementation must add advice, child aspects and validators using the builder parameter.