Class MethodAspectAttribute
Class MethodAspectAttribute. Implements the UniversalWrapperAttribute
Inherited Members
Namespace: AWS.Lambda.Powertools.Common
Assembly: AWS.Lambda.Powertools.EventHandler.Resolvers.BedrockAgentFunction.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method)]
[Injection(typeof(UniversalWrapperAspect), Inherited = true)]
public abstract class MethodAspectAttribute : UniversalWrapperAttribute
Methods
CreateHandler()
Creates the handler.
Declaration
protected abstract IMethodAspectHandler CreateHandler()
Returns
Type | Description |
---|---|
IMethodAspectHandler | IMethodAspectHandler. |
WrapAsync<T>(Func<object[], Task<T>>, object[], AspectEventArgs)
Wrap as an asynchronous operation.
Declaration
protected override sealed Task<T> WrapAsync<T>(Func<object[], Task<T>> target, object[] args, AspectEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
Func<object[], Task<T>> | target | The target. |
object[] | args | The arguments. |
AspectEventArgs | eventArgs | The AspectEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Task<T> | A Task<T> representing the asynchronous operation. |
Type Parameters
Name | Description |
---|---|
T |
Overrides
WrapSync<T>(Func<object[], T>, object[], AspectEventArgs)
Wraps as a synchronous operation.
Declaration
protected override sealed T WrapSync<T>(Func<object[], T> target, object[] args, AspectEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
Func<object[], T> | target | The target. |
object[] | args | The arguments. |
AspectEventArgs | eventArgs | The AspectEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
T | T. |
Type Parameters
Name | Description |
---|---|
T |