Show / Hide Table of Contents

    Class CancellationTokenArgumentResolver

    Provides the CancellationToken to the subscribed method.

    Inheritance
    object
    CancellationTokenArgumentResolver
    Implements
    IAdditionalArgumentResolver
    IArgumentResolver
    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.ArgumentResolvers
    Assembly: Silverback.Core.dll
    Syntax
    public class CancellationTokenArgumentResolver : IAdditionalArgumentResolver, IArgumentResolver

    Constructors

    CancellationTokenArgumentResolver()

    Provides the CancellationToken to the subscribed method.

    Declaration
    public CancellationTokenArgumentResolver()

    Methods

    CanResolve(Type)

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

    Declaration
    public bool CanResolve(Type parameterType)
    Parameters
    Type Name Description
    Type parameterType

    The type of the parameter to be resolved.

    Returns
    Type Description
    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.

    Declaration
    public object GetValue(Type parameterType, IServiceProvider serviceProvider, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Type parameterType

    The type of the parameter to be resolved.

    IServiceProvider serviceProvider

    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
    Type Description
    object

    A value to be forwarded to the subscribed method.

    Implements

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