PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Infrastructure Namespace / Type­Initialization­Client­Scopes Enumeration

TypeInitializationClientScopes Enumeration

Scopes (Instance or Static) in which ITypeInitializationClient are registered.

Namespace:  PostSharp.Sdk.AspectInfrastructure
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
[FlagsAttribute]
public enum TypeInitializationClientScopes
Members
  Member nameValueDescription
None0 No registration.
Instance1 A type initialization client with this scope will emit just after the superclass constructor completes and before the instance constructor runs.
Static2 A type initialization client with this scope will emit just before static field initializers run. (If there is no static constructor, it will be created.)
Module4 Module initializer. The client will emit into the assembly's module initializer.
OnInstanceConstructed8 A type initialization client with this scope will emit after the instance is fully constructed, and this includes constructors of the calling subclass. For example, if you have A inheriting from B, and you add an ITypeInitializationClient with this scope to B, it will emit after the constructor of A completes, not after the constructor of B.
BeforeInstanceConstructor16 A type initialization client with this scope will emit before instance field initializers run. (If there are no initializers, then before evaluation of arguments to the superclass constructor.)
InstanceStage232 A type initialization client with this scope will emit after the superclass constructor completes, just after all type initializations clients with scope Instance complete, and before the instance constructor runs.
See Also