IOnInstanceLocationInitializedAspect.OnInstanceLocationInitialized Method |
Namespace: PostSharp.Aspects
Assembly: PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
void OnInstanceLocationInitialized( LocationInitializationArgs args )
Parameters
- args
- Type: PostSharp.Aspects.LocationInitializationArgs
Information about the location.
This method is invoked at the beginning of an instance constructor. If more than one field or property is affected by this advice, this method will be called for them in declaration order of the properties (so, if in your C# file you declare first "a", then "b", then the method will be called for "a" first). If more than one advice group applies to a property, they will be called in order of aspect priority as normal.
This method is invoked for all instance fields and auto-implemented properties, even if they do not have an initializer. If they don't, the method is called with the default value in the Value property (null, zero, or false).
For structs, this method is only invoked if an actual non-default constructor of the struct is invoked.