Class SubscribedMethod
A subscribed method that can process certain messages.
Inherited Members
Namespace: Silverback.Messaging.Subscribers
Assembly: Silverback.Core.dll
Syntax
public class SubscribedMethod
Constructors
| Improve this doc View sourceSubscribedMethod(Func<IServiceProvider, object>, MethodInfo, SubscriptionOptions)
Initializes a new instance of the SubscribedMethod class.
Declaration
public SubscribedMethod(Func<IServiceProvider, object> targetTypeFactory, MethodInfo methodInfo, SubscriptionOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<IServiceProvider, object> | targetTypeFactory | The delegate to be used to resolve an instantiate of the type declaring the subscribed method. |
| MethodInfo | methodInfo | The MethodInfo related to the subscribed method. |
| SubscriptionOptions | options | The SubscriptionOptions. |
Properties
| Improve this doc View sourceAdditionalArgumentsResolvers
Gets the list of IAdditionalArgumentResolver to be used to invoke the method.
Declaration
public IReadOnlyList<IAdditionalArgumentResolver> AdditionalArgumentsResolvers { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<IAdditionalArgumentResolver> |
MessageArgumentResolver
Gets the IMessageArgumentResolver to be used to invoke the method.
Declaration
public IMessageArgumentResolver MessageArgumentResolver { get; }
Property Value
| Type | Description |
|---|---|
| IMessageArgumentResolver |
MessageArgumentType
Gets the type of the message argument (e.g. MyMessage or IEnumerable<MyMessage>).
Declaration
public Type MessageArgumentType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
MessageType
Gets the type of the message (or envelope) being subscribe.
Declaration
public Type MessageType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
MethodInfo
Gets the MethodInfo related to the subscribed method.
Declaration
public MethodInfo MethodInfo { get; }
Property Value
| Type | Description |
|---|---|
| MethodInfo |
Options
Gets the SubscriptionOptions.
Declaration
public SubscriptionOptions Options { get; }
Property Value
| Type | Description |
|---|---|
| SubscriptionOptions |
Parameters
Gets the ParameterInfo for each parameter of the subscribed method.
Declaration
public IReadOnlyList<ParameterInfo> Parameters { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ParameterInfo> |
Methods
| Improve this doc View sourceResolveTargetType(IServiceProvider)
Resolves an instantiate of the type declaring the subscribed method.
Declaration
public object ResolveTargetType(IServiceProvider serviceProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceProvider | serviceProvider | The IServiceProvider to be used to resolve the type or the necessary services. |
Returns
| Type | Description |
|---|---|
| object | The target type . |