Class EventToHubProxy<TAuthenticationToken>
Proxies IEvent<TAuthenticationToken> from the event bus to the INotificationHub. This requires one or more IEventHandler implementations in order to be triggered.
Inheritance
Inherited Members
Namespace: Cqrs.WebApi.Events.Handlers
Assembly: Cqrs.WebApi.dll
Syntax
public abstract class EventToHubProxy<TAuthenticationToken>
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The System.Type of the authentication token. |
Constructors
EventToHubProxy(ILogger, INotificationHub, IAuthenticationTokenHelper<TAuthenticationToken>)
Instantiates a new instance of EventToHubProxy<TAuthenticationToken>.
Declaration
protected EventToHubProxy(ILogger logger, INotificationHub notificationHub, IAuthenticationTokenHelper<TAuthenticationToken> authenticationTokenHelper)
Parameters
Type | Name | Description |
---|---|---|
cdmdotnet.Logging.ILogger | logger | |
INotificationHub | notificationHub | |
IAuthenticationTokenHelper<TAuthenticationToken> | authenticationTokenHelper |
Properties
AuthenticationTokenHelper
Gets or sets the IAuthenticationTokenHelper<TAuthenticationToken>.
Declaration
protected IAuthenticationTokenHelper<TAuthenticationToken> AuthenticationTokenHelper { get; }
Property Value
Type | Description |
---|---|
IAuthenticationTokenHelper<TAuthenticationToken> |
Logger
Gets or sets the cdmdotnet.Logging.ILogger.
Declaration
protected ILogger Logger { get; }
Property Value
Type | Description |
---|---|
cdmdotnet.Logging.ILogger |
NotificationHub
The INotificationHub to proxy IEvent<TAuthenticationToken> to.
Declaration
protected INotificationHub NotificationHub { get; }
Property Value
Type | Description |
---|---|
INotificationHub |
Methods
HandleGenericEvent(IEvent<TAuthenticationToken>)
Get the authentication token of the entity that triggered the request generating the provided message
Extract any proxy information attributes (NotifyCallerEventAttribute, NotifyEveryoneEventAttribute and NotifyEveryoneExceptCallerEventAttribute)
then proxy the provided message
to NotificationHub if an attribute is present.
Declaration
protected virtual void HandleGenericEvent(IEvent<TAuthenticationToken> message)
Parameters
Type | Name | Description |
---|---|---|
IEvent<TAuthenticationToken> | message | The IEvent<TAuthenticationToken> to proxy. |