Aspect that, when applied on an abstract or extern method, creates an implementation for this method.
Implements
Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
[MulticastAttributeUsage(MulticastTargets.Method, AllowMultiple = false, AllowExternalAssemblies = false, PersistMetaData = false, Inheritance = MulticastInheritance.None)]
[HasInheritedAttribute]
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Event|AttributeTargets.Interface, AllowMultiple = true)]
[Serializer(null)]
public abstract class MethodImplementationAspect : MethodLevelAspect, IMethodLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, IMethodInterceptionAspect, IMethodLevelAspect, IAspectRemarks
<p>This aspect is exactly identical to <xref href="PostSharp.Aspects.MethodInterceptionAspect" data-throw-if-not-resolved="false"></xref>, with the difference
that it applies to abstract methods.</p>
<br />
<p>
note
All classes implementing IAspect should typically be marked as serializable using the SerializableAttribute or PSerializableAttribute custom attribute . Fields that are only used at runtime (and unknown at compile-time) should be carefully marked with the NonSerializedAttribute or PNonSerializedAttribute custom attribute. When PostSharp is used on a platform that does not support aspect serialization (such as .NET Compact Framework, Silverlight, or Windows Phone), or when another aspect serializer is used, it is not necessary to mark the aspect class as serializable. For more information, see Understanding Aspect Serialization .
Constructors
| Name | Description |
|---|---|
| MethodImplementationAspect() |
Methods
| Name | Description |
|---|---|
| CreateAspectConfiguration() | Method invoked at build time to create a concrete AspectConfiguration instance specifically for the current Aspect type. |
| OnInvoke(MethodInterceptionArgs) | Method invoked instead of the method to which the aspect has been applied. |