Class ManagerSubscriptionService
Provides the capability to subscribe to Manager events.
Inheritance
Namespace: Copper.Conventions.Method.Client.V1
Assembly: Copper.Conventions.Method.Client.dll
Syntax
public class ManagerSubscriptionService : IManagerSubscriptionService, IDisposable
Constructors
View SourceManagerSubscriptionService(EventSubscriptionService, IManagerEventReceiverBuilderFactory)
Initializes a new instance of the ManagerSubscriptionService class.
Declaration
public ManagerSubscriptionService(EventSubscriptionService eventSubscriptionService, IManagerEventReceiverBuilderFactory managerEventReceiverBuilderFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| EventSubscriptionService | eventSubscriptionService | The event subscription service. |
| IManagerEventReceiverBuilderFactory | managerEventReceiverBuilderFactory | The manager event receiver builder factory. |
Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
|
Subscribe<TManagerEvent>(String, TManagerEvent)
Subscribes a Manager event handler.
Declaration
public async Task Subscribe<TManagerEvent>(string handlerName, TManagerEvent managerEventHandler)
where TManagerEvent : class
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | handlerName | The handler name. |
| TManagerEvent | managerEventHandler | The Manager event handler. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents outstanding operation. |
Type Parameters
| Name | Description |
|---|---|
| TManagerEvent | The Manager event contract type. |
Unsubscribe<TManagerEvent>(String)
Unsubscribes the specified Manager event handler.
Declaration
public async Task Unsubscribe<TManagerEvent>(string handlerName)
where TManagerEvent : class
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | handlerName | The handler name. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents outstanding operation. |
Type Parameters
| Name | Description |
|---|---|
| TManagerEvent | The Manager event contract type. |