Class NotificationService
Connects to a service to receive notifications.
Implements
Namespace: Unity.DigitalTwins.Live.Sdk.Services.Implementations
Assembly: solution.dll
Syntax
public class NotificationService : INotificationService, IDisposable
Constructors
NotificationService(EnvironmentSettings, IServiceHttpClientWrapper, IMessagingClientWrapper, ISignalBus)
Creates an instance of NotificationService.
Declaration
public NotificationService(EnvironmentSettings environmentSettings, IServiceHttpClientWrapper serviceHttpClientWrapper, IMessagingClientWrapper messagingClientWrapper, ISignalBus signalBus)
Parameters
| Type | Name | Description |
|---|---|---|
| EnvironmentSettings | environmentSettings | The EnvironmentSettings instance. |
| IServiceHttpClientWrapper | serviceHttpClientWrapper |
|
| IMessagingClientWrapper | messagingClientWrapper |
|
| ISignalBus | signalBus | The DeviceService implementation. |
Methods
CreateNotificationsAsync(IEnumerable<NotificationRequestResource>)
Implement this method to create a list of notifications.
Declaration
public async Task<Optional<IEnumerable<NotificationResource>>> CreateNotificationsAsync(IEnumerable<NotificationRequestResource> notificationResources)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<NotificationRequestResource> | notificationResources | List of resources containing details for notifications you want to create. |
Returns
| Type | Description |
|---|---|
| Task<Optional<IEnumerable<NotificationResource>>> | Returns a list of objects containing notification details if successful. |
Dispose()
Clean-up code that releases resources.
Declaration
public void Dispose()
GetNotifications()
Retrieves a list of Notification.
Declaration
public IEnumerable<Notification> GetNotifications()
Returns
| Type | Description |
|---|---|
| IEnumerable<Notification> | The list of Notification. |