MetalamaAPI documentationPost­Sharp API migrationPost­Sharp.​AspectsIComposition­Aspect
Open sandboxFocus

ICompositionAspect Interface

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
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).