PostSharp.ILAPI ReferencePost­Sharp.​AspectsModule­Initializer­Attribute
Open sandboxFocus

ModuleInitializerAttribute Class

Custom attribute that, when added to a static method, causes the method to be executed immediately after the assembly is loaded by the CLR. The target method must be public, parameterless, void, and non-generic.

Inheritance
ModuleInitializerAttribute
Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
[RequirePostSharp(null, "ModuleInitializer")]
public sealed class ModuleInitializerAttribute : Attribute

Constructors

Name Description
ModuleInitializerAttribute(Int32)

Initializes a new ModuleInitializerAttribute.

Properties

Name Description
Order

Gets the order in which the ModuleInitializerAttribute will be executed if the current project contains several initializers. Initializers with smaller values of the Order property get invoked first.