Show / Hide Table of Contents

    Class SubscribedMethod

    A subscribed method that can process certain messages.

    Inheritance
    object
    SubscribedMethod
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Subscribers
    Assembly: Silverback.Core.dll
    Syntax
    public class SubscribedMethod

    Constructors

    SubscribedMethod(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 instance of the type declaring the subscribed method.

    MethodInfo methodInfo

    The MethodInfo related to the subscribed method.

    SubscriptionOptions options

    The SubscriptionOptions.

    Properties

    AdditionalArgumentsResolvers

    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

    MessageParameter

    Gets the ParameterInfo for the message parameter.

    Declaration
    public ParameterInfo MessageParameter { get; }
    Property Value
    Type Description
    ParameterInfo

    MessageType

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

    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>

    ReturnType

    Gets the method return type.

    Declaration
    public MethodReturnType ReturnType { get; }
    Property Value
    Type Description
    MethodReturnType

    Methods

    ResolveTargetType(IServiceProvider)

    Resolves an instance 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.

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini