Open sandboxFocus

Property IsPostSharpRunning

IsPostSharpRunning

Gets a value indicating whether the PostSharp Platform is currently loaded.

Declaration
public static bool IsPostSharpRunning { get; }
Property Value
Type Description
bool
Remarks

Aspect code such as a static constructor can run both at build time, when PostSharp instantiates the aspect, and at run time. Test this property to skip initialization that must happen only at run time, for example getting dependencies from a service locator.

See Also