Interface ISignalBus
Defines a signal bus for application-wide communication.
Namespace: MAT.Atlas.Api.Core.Signals
Assembly: MAT.Atlas.Api.Core.dll
Syntax
public interface ISignalBus : IDisposable
Properties
Signals
Gets the signals.
Declaration
IObservable<ISignal> Signals { get; }
Property Value
Type | Description |
---|---|
System.IObservable<ISignal> | The signals. |
UiScheduler
Gets the UI scheduler.
Declaration
IScheduler UiScheduler { get; }
Property Value
Type | Description |
---|---|
System.Reactive.Concurrency.IScheduler | The UI sh scheduler. |
Methods
Send<T>(T)
Sends the specified signal.
Declaration
void Send<T>(T signal)
where T : ISignal
Parameters
Type | Name | Description |
---|---|---|
T | signal | The signal. |
Type Parameters
Name | Description |
---|---|
T | Type of the signal. |
SendAsync<T>(T)
Sends the specified signal asynchronously.
Declaration
Task SendAsync<T>(T signal)
where T : ISignal
Parameters
Type | Name | Description |
---|---|---|
T | signal | The signal. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task. |
Type Parameters
Name | Description |
---|---|
T | Type of the signal. |
Subscribe<T>(Action<T>)
Subscribes the specified action.
Declaration
IDisposable Subscribe<T>(Action<T> action)
where T : ISignal
Parameters
Type | Name | Description |
---|---|---|
System.Action<T> | action | The action. |
Returns
Type | Description |
---|---|
System.IDisposable | IDisposable. |
Type Parameters
Name | Description |
---|---|
T | Type of the signal. |
Subscribe<T>(Action<T>, Predicate<T>)
Subscribes the specified action.
Declaration
IDisposable Subscribe<T>(Action<T> action, Predicate<T> filter)
where T : ISignal
Parameters
Type | Name | Description |
---|---|---|
System.Action<T> | action | The action. |
System.Predicate<T> | filter | The filter. |
Returns
Type | Description |
---|---|
System.IDisposable | IDisposable. |
Type Parameters
Name | Description |
---|---|
T | Type of the signal. |
Subscribe<T>(Action<T>, Predicate<T>, IScheduler)
Subscribes the specified action.
Declaration
IDisposable Subscribe<T>(Action<T> action, Predicate<T> filter, IScheduler observeOnScheduler)
where T : ISignal
Parameters
Type | Name | Description |
---|---|---|
System.Action<T> | action | The action. |
System.Predicate<T> | filter | The filter. |
System.Reactive.Concurrency.IScheduler | observeOnScheduler | The observe on scheduler. |
Returns
Type | Description |
---|---|
System.IDisposable | IDisposable. |
Type Parameters
Name | Description |
---|---|
T | Type of the signal. |
Subscribe<T>(Action<T>, Predicate<T>, IScheduler, IScheduler)
Subscribes the specified action.
Declaration
IDisposable Subscribe<T>(Action<T> action, Predicate<T> filter, IScheduler observeOnScheduler, IScheduler subscribeOnScheduler)
where T : ISignal
Parameters
Type | Name | Description |
---|---|---|
System.Action<T> | action | The action. |
System.Predicate<T> | filter | The filter. |
System.Reactive.Concurrency.IScheduler | observeOnScheduler | The observe on scheduler. |
System.Reactive.Concurrency.IScheduler | subscribeOnScheduler | The subscribe on scheduler. |
Returns
Type | Description |
---|---|
System.IDisposable | IDisposable. |
Type Parameters
Name | Description |
---|---|
T | Type of the signal. |
Subscribe<T>(Action<T>, IScheduler)
Subscribes the specified action.
Declaration
IDisposable Subscribe<T>(Action<T> action, IScheduler observeOnScheduler)
where T : ISignal
Parameters
Type | Name | Description |
---|---|---|
System.Action<T> | action | The action. |
System.Reactive.Concurrency.IScheduler | observeOnScheduler | The observe on scheduler. |
Returns
Type | Description |
---|---|
System.IDisposable | IDisposable. |
Type Parameters
Name | Description |
---|---|
T | Type of the signal. |
Subscribe<T>(Action<T>, IScheduler, IScheduler)
Subscribes the specified action.
Declaration
IDisposable Subscribe<T>(Action<T> action, IScheduler observeOnScheduler, IScheduler subscribeOnScheduler)
where T : ISignal
Parameters
Type | Name | Description |
---|---|---|
System.Action<T> | action | The action. |
System.Reactive.Concurrency.IScheduler | observeOnScheduler | The observe on scheduler. |
System.Reactive.Concurrency.IScheduler | subscribeOnScheduler | The subscribe on scheduler. |
Returns
Type | Description |
---|---|
System.IDisposable | IDisposable. |
Type Parameters
Name | Description |
---|---|
T | Type of the signal. |