An exception thrown by IAdviceFactory when compile-time code attempts to add a template to a target declaration and the template signature is not compatible with the advice and the target declaration.
Implements
Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public sealed class InvalidTemplateSignatureException : Exception, ISerializableRemarks
This exception is thrown at compile time when an aspect's BuildAspect(IAspectBuilder<T>) method attempts to apply a T# template whose signature does not match the requirements of the target declaration or the advice being applied.
Common causes include:
- The template method's return type is incompatible with the target method's return type.
- The template method's parameters do not match the target method's parameters.
- Using a method template where a property or event template is expected, or vice versa.
- The template is missing required template parameters or has extra unexpected parameters.