Class MessagingClientWrapper
Inheritance
MessagingClientWrapper
Implements
IAsyncDisposable
Assembly: solution.dll
Syntax
public sealed class MessagingClientWrapper : IMessagingClientWrapper, IAsyncDisposable, IDisposable
Constructors
MessagingClientWrapper(IServiceMessagingClient, EnvironmentSettings)
Declaration
public MessagingClientWrapper(IServiceMessagingClient messagingClient, EnvironmentSettings environmentSettings)
Parameters
Properties
State
Declaration
public ConnectionState State { get; }
Property Value
Methods
ConnectAsync(String)
Opens a connection to a server and prepare validation parameters for other class methods.
Declaration
public async Task ConnectAsync(string cloudServicesAccessToken)
Parameters
Type |
Name |
Description |
String |
cloudServicesAccessToken |
Validates access to cloud services.
|
Returns
DisconnectAsync()
Disconnects from the server.
Declaration
public async Task DisconnectAsync()
Returns
Dispose()
Declaration
DisposeAsync()
Declaration
public async ValueTask DisposeAsync()
Returns
Type |
Description |
ValueTask |
|
SendAsync(IEnumerable<Message>)
Awaitable method to send a message to a server
Declaration
public Task SendAsync(IEnumerable<Message> messages)
Parameters
Returns
Events
OnDeviceTelemetriesAvailable
Returns updated device telemetries.
Declaration
public event Action<DeviceTelemetriesResource> OnDeviceTelemetriesAvailable
Event Type
Type |
Description |
Action<DeviceTelemetriesResource> |
|
OnNotificationReceived
Returns received notifications.
Declaration
public event Action<NotificationResource> OnNotificationReceived
Event Type
Type |
Description |
Action<NotificationResource> |
|
OnTelemetryAggregateAvailable
Returns updated telemetry aggregates.
Declaration
public event Action<TelemetryAggregateResource> OnTelemetryAggregateAvailable
Event Type
Type |
Description |
Action<TelemetryAggregateResource> |
|
Implements
IAsyncDisposable