IOT Dash
Public Member Functions | Protected Member Functions | Properties | List of all members
IotDash.Domain.Mediator.SimpleMediator< TChannelKey, TMsg > Class Template Reference
Inheritance diagram for IotDash.Domain.Mediator.SimpleMediator< TChannelKey, TMsg >:
Inheritance graph
[legend]
Collaboration diagram for IotDash.Domain.Mediator.SimpleMediator< TChannelKey, TMsg >:
Collaboration graph
[legend]

Public Member Functions

override async Task Send (TChannelKey ch, object? sender, TMsg msg)
 
override void Unsubscribe (ISubscription< TChannelKey, TMsg > sub)
 
override IEnumerable< ITarget< TChannelKey, TMsg > > GetChannelCopy (TChannelKey key)
 
override int TargetCountOnChannel (TChannelKey key)
 
- Public Member Functions inherited from IotDash.Domain.Mediator.AbstractMediator< TChannelKey, TMsg >
virtual void Subscribe (TChannelKey msgChannel, ITarget< TChannelKey, TMsg > target, out ISubscription subscription)
 
virtual void Subscribe (TChannelKey msgChannel, ITarget< TChannelKey, TMsg > target, SubscriptionGuard guard)
 
abstract int TargetCountOnChannel (TChannelKey key)
 
abstract IEnumerable< ITarget< TChannelKey, TMsg > > GetChannelCopy (TChannelKey key)
 
abstract void Unsubscribe (ISubscription< TChannelKey, TMsg > subscription)
 
abstract Task Send (TChannelKey msgChannel, object sender, TMsg msg)
 

Protected Member Functions

override void SubscribeInternal (TChannelKey msgChannel, ITarget< TChannelKey, TMsg > target)
 
abstract void SubscribeInternal (TChannelKey msgChannel, ITarget< TChannelKey, TMsg > target)
 

Properties

override int TargetCount [get]
 
override IEnumerable< TChannelKey > Keys [get]
 
- Properties inherited from IotDash.Domain.Mediator.AbstractMediator< TChannelKey, TMsg >
abstract int TargetCount [get]
 
abstract IEnumerable< TChannelKey > Keys [get]
 

Detailed Description

Manages subscribers and mediates messages between them.

Template Parameters
TChannelKeyType of channel identifier.
TMsgType of message.
Type Constraints
TChannelKey :notnull 
TMsg :notnull 

Member Function Documentation

◆ GetChannelCopy()

override IEnumerable< ITarget< TChannelKey, TMsg > > IotDash.Domain.Mediator.SimpleMediator< TChannelKey, TMsg >.GetChannelCopy ( TChannelKey  key)
inlinevirtual

A list of all subscribers of channel key .

Parameters
keyThe key identifying that channel.

Implements IotDash.Domain.Mediator.AbstractMediator< TChannelKey, TMsg >.

◆ SubscribeInternal()

override void IotDash.Domain.Mediator.SimpleMediator< TChannelKey, TMsg >.SubscribeInternal ( TChannelKey  msgChannel,
ITarget< TChannelKey, TMsg >  target 
)
inlineprotectedvirtual

Internal, ISubscription unaware method prepared for inheritor implementation. It is here to prevent the inheritor from forgetting to properly create the ISubscription.

Parameters
msgChannel
target

Implements IotDash.Domain.Mediator.AbstractMediator< TChannelKey, TMsg >.

◆ TargetCountOnChannel()

override int IotDash.Domain.Mediator.SimpleMediator< TChannelKey, TMsg >.TargetCountOnChannel ( TChannelKey  key)
inlinevirtual

Number of ITarget<TChannelKey, TMsg> subscribed to channel key .

Parameters
keyThe channel to filter by.

Implements IotDash.Domain.Mediator.AbstractMediator< TChannelKey, TMsg >.

◆ Unsubscribe()

override void IotDash.Domain.Mediator.SimpleMediator< TChannelKey, TMsg >.Unsubscribe ( ISubscription< TChannelKey, TMsg >  sub)
inlinevirtual

The documentation for this class was generated from the following file: