You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Things tend to get complicated, when I'm trying to decorate my executors:
services.Decorate(typeof(IExecutor<,>),typeof(LoggingDecorator<,>));// returns decorated with LoggingDecoratorprovider.GetRequiredService<IExecutor<SpecificRequest,SpecificResponse>>()// returns NOT decorated with LoggingDecorator
provider.GetRequiredService<ISpecifiedExecutor>()// if trying to decorate ISpecifiedExecutor// throws an exception, when I'm trying to resolve ISpecifiedExecutor// A suitable constructor for type // 'LoggingDecorator`2[TRequest,TResponse]' could not be located.// Ensure the type is concrete and services are registered for all parameters of a public constructor.
services.Decorate(typeof(ISpecifiedExecutor),typeof(LoggingDecorator<,>));
Is there any way to decorate ISpecifiedExecutor with LoggingDecorator<,>?
The text was updated successfully, but these errors were encountered:
Suppose, I have this simplified model with the specified registration:
Works like a charm, everything is fine.
Things tend to get complicated, when I'm trying to decorate my executors:
Is there any way to decorate
ISpecifiedExecutor
withLoggingDecorator<,>
?The text was updated successfully, but these errors were encountered: