Table of Contents

Class DefaultAdditionalArgumentResolver

Namespace
Silverback.Messaging.Subscribers.ArgumentResolvers
Assembly
Silverback.Core.dll

Resolves the additional parameters of the subscribed methods using the IServiceProvider.

public class DefaultAdditionalArgumentResolver : IAdditionalArgumentResolver, IArgumentResolver
Inheritance
DefaultAdditionalArgumentResolver
Implements
Inherited Members

Constructors

DefaultAdditionalArgumentResolver()

public DefaultAdditionalArgumentResolver()

Methods

CanResolve(Type)

Returns a boolean value indicating whether this resolver instance can handle the parameter of the specified type.

public bool CanResolve(Type parameterType)

Parameters

parameterType Type

The type of the parameter to be resolved.

Returns

bool

A boolean value indicating whether the specified parameter type can be handled.

GetValue(Type, IServiceProvider, CancellationToken)

Returns a suitable value for the parameter of the specified type.

public object GetValue(Type parameterType, IServiceProvider serviceProvider, CancellationToken cancellationToken)

Parameters

parameterType Type

The type of the parameter to be resolved.

serviceProvider IServiceProvider

The IServiceProvider to be used to resolve the necessary services.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the subscriber method operation.

Returns

object

A value to be forwarded to the subscribed method.