Class FreezableAttribute
Custom attribute that, when applied to a class, implements the FreezableThreadingModel to this class. The aspect introduces the IFreezable interface into the target class. After the Freeze() method has been invoked, the object can no longer be modified, and can therefore be safely shared between several threads.
Inheritance
Implements
Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
[IntroduceInterface]
[Metric("UsedFeatures", "PostSharp.Patterns.Threading.Freezable")]
[Serializer]
public sealed class FreezableAttribute : ReadOnlyThreadAwareAttribute, ITypeLevelAspect, ITypeLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ICloneAwareAspect, IInstanceScopedAspect, IAspectProvider, IService, IAdviceProvider, IAspect, IQueryInterface, IConcurrencyController, IFreezable, IThreadAware
Constructors
Name | Description |
---|---|
FreezableAttribute() | |
FreezableAttribute(PortableFormatterConstructorContext) |
Methods
Name | Description |
---|---|
Advise(Object) | |
OnCloned(ICloneAwareAspect) | Method called after the an object enhanced by the current aspect has been
cloned using MemberwiseClone(). The |
ToString() | Returns a string that represents the current object. |
Explicit Interface Implementations
Name | Description |
---|---|
IFreezable.Freeze() | |
IThreadAware.ConcurrencyController |