Class DefaultAdditionalArgumentResolver
Simply tries to resolve the additional parameters of the subscribed methods using the IServiceProvider.
Inherited Members
Namespace: Silverback.Messaging.Subscribers.ArgumentResolvers
Assembly: Silverback.Core.dll
Syntax
public class DefaultAdditionalArgumentResolver : IAdditionalArgumentResolver, IArgumentResolver
Methods
| Improve this doc View sourceCanResolve(Type)
Returns a boolean value indicating whether this resolver instance can handle the parameter of the specified type.
Declaration
public bool CanResolve(Type parameterType)
Parameters
Type | Name | Description |
---|---|---|
Type | parameterType | The type of the parameter to be resolved. |
Returns
Type | Description |
---|---|
bool | A boolean value indicating whether the specified parameter type can be handled. |
GetValue(Type, IServiceProvider)
Returns a suitable value for the parameter of the specified type.
Declaration
public object GetValue(Type parameterType, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
Type | parameterType | The type of the parameter to be resolved. |
IServiceProvider | serviceProvider | The IServiceProvider to be used to resolve the necessary services. |
Returns
Type | Description |
---|---|
object | A value to be forwarded to the subscribed method. |