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 Manager
Declaration
public ManagerSubscriptionService(EventSubscriptionService eventSubscriptionService, IManagerEventReceiverBuilderFactory managerEventReceiverBuilderFactory)
Parameters
Type | Name | Description |
---|---|---|
Event |
eventSubscriptionService | The event subscription service. |
IManager |
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. |
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. |
handlerName | The handler name. |
TManager |
managerEventHandler | The Manager event handler. |
Returns
Type | Description |
---|---|
System. |
A System. |
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. |
handlerName | The handler name. |
Returns
Type | Description |
---|---|
System. |
A System. |
Type Parameters
Name | Description |
---|---|
TManagerEvent | The Manager event contract type. |