Open sandboxFocus

Class EntryPointAttribute

Custom attribute that, when applied to a private or protected instance method, causes all threading model aspects (derived from ThreadAwareAttribute) to treat the method as an entry point, like a public method.

Inheritance
EntryPointAttribute
Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method)]
[MulticastAttributeUsage(MulticastTargets.Method, TargetMemberAttributes = MulticastAttributes.Private|MulticastAttributes.Protected|MulticastAttributes.Instance, Inheritance = MulticastInheritance.Strict)]
public sealed class EntryPointAttribute : MulticastAttribute
Remarks

By default, threading models acquire access to the object, or dispatch the call in the case of ActorAttribute, only when a thread enters the object through a public or internal method. A private method invoked as a callback, for instance an event handler or a delegate passed to another object, bypasses this mechanism, and accessing a field from it results in an exception when run-time verification is enabled. Add this custom attribute to such methods.

Constructors

Name Description
EntryPointAttribute()

See Also