Table of Contents

Class SubscribedMethod

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

A subscribed method that can process certain messages.

public class SubscribedMethod
Inheritance
SubscribedMethod
Inherited Members

Constructors

SubscribedMethod(Func<IServiceProvider, object>, MethodInfo, SubscriptionOptions)

Initializes a new instance of the SubscribedMethod class.

public SubscribedMethod(Func<IServiceProvider, object> targetTypeFactory, MethodInfo methodInfo, SubscriptionOptions options)

Parameters

targetTypeFactory Func<IServiceProvider, object>

The delegate to be used to resolve an instance of the type declaring the subscribed method.

methodInfo MethodInfo

The MethodInfo related to the subscribed method.

options SubscriptionOptions

The SubscriptionOptions.

Properties

AdditionalArgumentsResolvers

Gets the list of IAdditionalArgumentResolver to be used to invoke the method.

public IReadOnlyList<IAdditionalArgumentResolver> AdditionalArgumentsResolvers { get; }

Property Value

IReadOnlyList<IAdditionalArgumentResolver>

MessageArgumentResolver

Gets the IMessageArgumentResolver to be used to invoke the method.

public IMessageArgumentResolver MessageArgumentResolver { get; }

Property Value

IMessageArgumentResolver

MessageParameter

Gets the ParameterInfo for the message parameter.

public ParameterInfo MessageParameter { get; }

Property Value

ParameterInfo

MessageType

Gets the type of the message (or envelope) being subscribed.

public Type MessageType { get; }

Property Value

Type

MethodInfo

Gets the MethodInfo related to the subscribed method.

public MethodInfo MethodInfo { get; }

Property Value

MethodInfo

Options

public SubscriptionOptions Options { get; }

Property Value

SubscriptionOptions

Parameters

Gets the ParameterInfo for each parameter of the subscribed method.

public IReadOnlyList<ParameterInfo> Parameters { get; }

Property Value

IReadOnlyList<ParameterInfo>

ReturnType

Gets the method return type.

public MethodReturnType ReturnType { get; }

Property Value

MethodReturnType

Methods

ResolveTargetType(IServiceProvider)

Resolves an instance of the type declaring the subscribed method.

public object ResolveTargetType(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

The IServiceProvider to be used to resolve the type or the necessary services.

Returns

object

The target type.