There is no full equivalent of this attribute in Metalama, and there will not be. To mark an aspect as inherited, use the InheritableAttribute custom attribute. To specify the eligibility of an aspect, implement the BuildEligibility(IEligibilityBuilder<T>) method.
Namespace: PostSharp.Extensibility
Assembly: Metalama.Migration.dll
Syntax
[AttributeUsage(AttributeTargets.Class)]
[Obsolete("There is no full equivalent of this attribute in Metalama, and there will not be. To mark an aspect as inherited, use the 'InheritableAttribute' custom attribute. To specify the eligibility of an aspect, implement the 'IEligible<T>.BuildEligibility(IEligibilityBuilder<T>)' method.", false)]
public sealed class MulticastAttributeUsageAttribute : Attribute
Constructors
Name | Description |
---|---|
MulticastAttributeUsageAttribute() | |
MulticastAttributeUsageAttribute(MulticastTargets) | In Metalama, the valid targets are determined by the declaration types for which the IAspect<T> interface is implemented. Additionally, you can implement the BuildEligibility(IEligibilityBuilder<T>) method. |
Properties
Name | Description |
---|---|
AllowExternalAssemblies | Targeting external declarations is not supported in Metalama. |
AllowMultiple | Metalama always allows multiple attributes, but only one is actually processed. The other instances are exposed in |
Inheritance | To mark an aspect as inherited, use InheritableAttribute or implement IConditionallyInheritableAspect. Multicast inheritance is not supported in Metalama, but you can build a similar feature by making the aspect implement the IAspect<T> for INamedType and implement multicasting in the BuildAspect(IAspectBuilder<T>) method. |
PersistMetaData | By default, custom attributes (metadata) are preserved in the code. To remove them, use the advice RemoveAttributes(IDeclaration, INamedType). |
TargetExternalMemberAttributes | Applying an aspect to an external declaration is not supported in Metalama. |
TargetExternalTypeAttributes | Applying an aspect to an external declaration is not supported in Metalama. |
TargetMemberAttributes | In Metalama, implement the BuildEligibility(IEligibilityBuilder<T>) method. |
TargetParameterAttributes | In Metalama, implement the BuildEligibility(IEligibilityBuilder<T>) method. |
TargetTypeAttributes | In Metalama, implement the BuildEligibility(IEligibilityBuilder<T>) method. |
ValidOn | In Metalama, the valid targets are determined by the declaration types for which the IAspect<T> interface is implemented. Additionally, you can implement the BuildEligibility(IEligibilityBuilder<T>) method. |