IOT Dash
Public Member Functions | List of all members
IotDash.Services.Messaging.MessageMediator Class Reference
Inheritance diagram for IotDash.Services.Messaging.MessageMediator:
Inheritance graph
[legend]
Collaboration diagram for IotDash.Services.Messaging.MessageMediator:
Collaboration graph
[legend]

Public Member Functions

void Subscribe< TMsg > (ITarget< Type, TMsg > target, out ISubscription subscription)
 
void Subscribe< TMsg > (ITarget< Type, TMsg > target, SubscriptionGuard guard)
 
Task Send< TMsg > (object? sender, TMsg message)
 
- Public Member Functions inherited from IotDash.Domain.Mediator.AbstractMediator< Type, object >
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)
 

Additional Inherited Members

- Protected Member Functions inherited from IotDash.Domain.Mediator.AbstractMediator< Type, object >
abstract void SubscribeInternal (TChannelKey msgChannel, ITarget< TChannelKey, TMsg > target)
 
- Properties inherited from IotDash.Domain.Mediator.AbstractMediator< Type, object >
abstract int TargetCount [get]
 
abstract IEnumerable< TChannelKey > Keys [get]
 

Detailed Description

This class is a specialisation of the AbstractMediator<TChannelKey, TMsg> which mediates objects over channels differentiated by the objects' types. It provides nicer API than the parent class.

Member Function Documentation

◆ Send< TMsg >()

Task IotDash.Services.Messaging.MessageMediator.Send< TMsg > ( object?  sender,
TMsg  message 
)
inline
Type Constraints
TMsg :notnull 

◆ Subscribe< TMsg >() [1/2]

void IotDash.Services.Messaging.MessageMediator.Subscribe< TMsg > ( ITarget< Type, TMsg >  target,
out ISubscription  subscription 
)
inline

Subscribe target for message of type TMsg . Produced subscription is used to cancel the subscription.

Template Parameters
TMsg
Parameters
target
subscription
Type Constraints
TMsg :notnull 

◆ Subscribe< TMsg >() [2/2]

void IotDash.Services.Messaging.MessageMediator.Subscribe< TMsg > ( ITarget< Type, TMsg >  target,
SubscriptionGuard  guard 
)
inline
Type Constraints
TMsg :notnull 

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