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.
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[Obsolete("There is no composition aspect in Metalama, but you can build one by deriving the 'TypeAspect' type, implementing the 'TypeAspect.BuildAspect(IAspectBuilder<INamedType>)' method, and calling <c>builder</c>.'IAspectBuilder.Advice'.'IAdviceFactory.ImplementInterface(INamedType, INamedType, OverrideStrategy, object?)'. There is no concept of protected interface in Metalama.", false)]
public interface ICompositionAspect : ITypeLevelAspect, IAspect
Methods
Name | Description |
---|---|
CreateImplementationObject(AdviceArgs) | In Metalama, you would typically have this code in an initializer added to the type using AddInitializer(INamedType, string, InitializerKind, object?, object?). |