CompositionAspect Class
There is no composition aspect in Metalama, but you can build one by deriving the TypeAspect type, implementing
the BuildAspect(IAspectBuilder<INamedType>) method, and calling builder
.Advice.ImplementInterface(INamedType, INamedType, OverrideStrategy, Object).
There is no concept of protected interface in Metalama.
Implements
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[MulticastAttributeUsage]
public abstract class CompositionAspect : TypeLevelAspect, ITypeLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ICompositionAspect, ITypeLevelAspect, IAspect
Constructors
Name | Description |
---|---|
CompositionAspect() |
Properties
Name | Description |
---|---|
AncestorOverrideAction | |
GenerateImplementationAccessor | There is no equivalent to this feature in Metalama. |
NonSerializedImplementation | Implementations are always non-serializable by default in Metalama. |
OverrideAction | Equivalent to the OverrideStrategy parameter passed to the ImplementInterface(INamedType, INamedType, OverrideStrategy, Object) method. |
Methods
Name | Description |
---|---|
CreateAspectConfiguration() | |
CreateImplementationObject(AdviceArgs) | In Metalama, you would typically have this code in an initializer added to the type using AddInitializer(INamedType, String, InitializerKind, Object, Object). |
GetPublicInterfaces(Type) | The interface type is passed as a parameter to the ImplementInterface(INamedType, INamedType, OverrideStrategy, Object) method. |
SetAspectConfiguration(AspectConfiguration, Type) |