Show / Hide Table of Contents

    Class EventSubscriptionService

    Provides the capability to subscribe to events.

    Inheritance
    System.Object
    EventSubscriptionService
    Implements
    System.IDisposable
    Namespace: Copper.Eventing.Client
    Assembly: Copper.Eventing.Client.dll
    Syntax
    public class EventSubscriptionService : IDisposable

    Constructors

    View Source

    EventSubscriptionService(EventHandlerProxyFactory)

    Initializes a new instance of the EventSubscriptionService class.

    Declaration
    public EventSubscriptionService(EventHandlerProxyFactory eventHandlerProxyFactory)
    Parameters
    Type Name Description
    EventHandlerProxyFactory eventHandlerProxyFactory

    The event handler proxy factory.

    Methods

    View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    View Source

    Dispose(Boolean)

    Releases unmanaged and - optionally - managed resources.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    View Source

    Subscribe<TEvent>(TEvent, EventReceiverBuilder)

    Subscribes an event handler using the specified event receiver.

    Declaration
    public async Task Subscribe<TEvent>(TEvent eventHandler, EventReceiverBuilder eventReceiverBuilder)
        where TEvent : class
    Parameters
    Type Name Description
    TEvent eventHandler

    The event handler.

    EventReceiverBuilder eventReceiverBuilder

    The event receiver builder.

    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task that represents outstanding operation.

    Type Parameters
    Name Description
    TEvent

    The event contract type.

    View Source

    Unsubscribe<TEvent>(TEvent)

    Unsubscribes the specified event handler.

    Declaration
    public async Task Unsubscribe<TEvent>(TEvent eventHandler)
        where TEvent : class
    Parameters
    Type Name Description
    TEvent eventHandler

    The event handler.

    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task that represents outstanding operation.

    Type Parameters
    Name Description
    TEvent

    The event contract type.

    Implements

    System.IDisposable
    • View Source
    Back to top Generated by DocFX