In Metalama, you can add aspects using fabrics. In aspects, implement the BuildAspect(IAspectBuilder<T>). In fabrics, implement AmendType(ITypeAmender), AmendProject(IProjectAmender) or AmendNamespace(INamespaceAmender). In both cases, call the IAspectReceiverSelector<TTarget>.With<TMember>(System.Func<TTarget,System.Collections.Generic.IEnumerable<TMember>>) method, then call AddAspect<TAspect>().
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[Obsolete("In Metalama, you can add aspects using fabrics. In aspects, implement the 'IAspect<T>.BuildAspect(IAspectBuilder<T>)'. In fabrics, implement 'TypeFabric.AmendType(ITypeAmender)', 'ProjectFabric.AmendProject(IProjectAmender)' or 'NamespaceFabric.AmendNamespace(INamespaceAmender)'. In both cases, call the '!:IAspectReceiverSelector<TTarget>.With<TMember>(System.Func<TTarget,System.Collections.Generic.IEnumerable<TMember>>)' method, then call 'IAspectReceiver<TDeclaration>.AddAspect<TAspect>()'.", false)]
public interface IAspectProvider : IAspect, IService
Methods
Name | Description |
---|---|
ProvideAspects(object) |