Assumed I have an aspect implementing IInstanceScopedAspect
and I have this aspect applied to methods in a type. How can I initialize the aspects when creating the object with FormatterServices.GetUninitializedObject
? The constructor is not executed and therefore I get a NullReferenceException
when I execute the method where the aspect is applied.
Is there a PostSharp API which can be used to initialize the object's aspects ?