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
targetTypeFactoryFunc<IServiceProvider, object>The delegate to be used to resolve an instance of the type declaring the subscribed method.
methodInfoMethodInfoThe MethodInfo related to the subscribed method.
optionsSubscriptionOptionsThe SubscriptionOptions.
Properties
AdditionalArgumentsResolvers
Gets the list of IAdditionalArgumentResolver to be used to invoke the method.
public IReadOnlyList<IAdditionalArgumentResolver> AdditionalArgumentsResolvers { get; }
Property Value
MessageArgumentResolver
Gets the IMessageArgumentResolver to be used to invoke the method.
public IMessageArgumentResolver MessageArgumentResolver { get; }
Property Value
MessageParameter
Gets the ParameterInfo for the message parameter.
public ParameterInfo MessageParameter { get; }
Property Value
MessageType
Gets the type of the message (or envelope) being subscribed.
public Type MessageType { get; }
Property Value
MethodInfo
Gets the MethodInfo related to the subscribed method.
public MethodInfo MethodInfo { get; }
Property Value
Options
Gets the SubscriptionOptions.
public SubscriptionOptions Options { get; }
Property Value
Parameters
Gets the ParameterInfo for each parameter of the subscribed method.
public IReadOnlyList<ParameterInfo> Parameters { get; }
Property Value
ReturnType
Gets the method return type.
public MethodReturnType ReturnType { get; }
Property Value
Methods
ResolveTargetType(IServiceProvider)
Resolves an instance of the type declaring the subscribed method.
public object ResolveTargetType(IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProviderThe IServiceProvider to be used to resolve the type or the necessary services.
Returns
- object
The target type.