C# Класс Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.Repository.IotHubRepository

Wraps calls to the IoT hub identity store. IDisposable is implemented in order to close out the connection to the IoT Hub when this object is no longer in use
Наследование: IIotHubRepository, IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
AddDeviceAsync ( DeviceModel device, Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Models.SecurityKeys securityKeys ) : Task

Adds the provided device to the IoT hub with the provided security keys

Dispose ( ) : void

Implement the IDisposable interface in order to close the device manager

GetDeviceKeysAsync ( string deviceId ) : Task
GetIotHubDeviceAsync ( string deviceId ) : Task
IotHubRepository ( IIoTHubDeviceManager deviceManager ) : System
RemoveDeviceAsync ( string deviceId ) : System.Threading.Tasks.Task
SendCommand ( string deviceId, CommandHistory command ) : System.Threading.Tasks.Task
TryAddDeviceAsync ( Device oldIotHubDevice ) : Task

Attempts to add the device as a new device and swallows all exceptions

TryRemoveDeviceAsync ( string deviceId ) : Task

Attempts to remove the device from the IoT Hub and eats any exceptions that are thrown during the delete process.

UpdateDeviceEnabledStatusAsync ( string deviceId, bool isEnabled ) : Task

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Описание методов

AddDeviceAsync() публичный Метод

Adds the provided device to the IoT hub with the provided security keys
public AddDeviceAsync ( DeviceModel device, Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Models.SecurityKeys securityKeys ) : Task
device Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Models.DeviceModel
securityKeys Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Models.SecurityKeys
Результат Task

Dispose() публичный Метод

Implement the IDisposable interface in order to close the device manager
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

GetDeviceKeysAsync() публичный Метод

public GetDeviceKeysAsync ( string deviceId ) : Task
deviceId string
Результат Task

GetIotHubDeviceAsync() публичный Метод

public GetIotHubDeviceAsync ( string deviceId ) : Task
deviceId string
Результат Task

IotHubRepository() публичный Метод

public IotHubRepository ( IIoTHubDeviceManager deviceManager ) : System
deviceManager IIoTHubDeviceManager
Результат System

RemoveDeviceAsync() публичный Метод

public RemoveDeviceAsync ( string deviceId ) : System.Threading.Tasks.Task
deviceId string
Результат System.Threading.Tasks.Task

SendCommand() публичный Метод

public SendCommand ( string deviceId, CommandHistory command ) : System.Threading.Tasks.Task
deviceId string
command Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Models.CommandHistory
Результат System.Threading.Tasks.Task

TryAddDeviceAsync() публичный Метод

Attempts to add the device as a new device and swallows all exceptions
public TryAddDeviceAsync ( Device oldIotHubDevice ) : Task
oldIotHubDevice Device The IoT Hub Device to add back into the IoT Hub
Результат Task

TryRemoveDeviceAsync() публичный Метод

Attempts to remove the device from the IoT Hub and eats any exceptions that are thrown during the delete process.
public TryRemoveDeviceAsync ( string deviceId ) : Task
deviceId string ID of the device to remove
Результат Task

UpdateDeviceEnabledStatusAsync() публичный Метод

public UpdateDeviceEnabledStatusAsync ( string deviceId, bool isEnabled ) : Task
deviceId string
isEnabled bool
Результат Task