PostSharpAPI ReferencePost­Sharp.​Patterns.​ThreadingAssume­Immutable­AttributeAssume­Immutable­Attribute
Open sandboxFocus

AssumeImmutableAttribute Constructor

AssumeImmutableAttribute()

Initializes a new instance of the AssumeImmutableAttribute custom attribute that can be applied to a specific targetType.

Declaration
public AssumeImmutableAttribute()

AssumeImmutableAttribute(Type)

Initializes a new instance of the AssumeImmutableAttribute custom attribute that can be applied to an assembly, passing the immutable as a constructor argument. This constructor allows to add assumptions for types that are not defined in this current assembly.

Declaration
public AssumeImmutableAttribute(Type targetType)
Parameters
Type Name Description
System.Type targetType

The immutable targetType.