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

Наследование: IDeviceRegistryCrudRepository, IDeviceRegistryListRepository
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddDeviceAsync ( DeviceModel device ) : Task

Adds a device to the DocumentDB. Throws a DeviceAlreadyRegisteredException if a device already exists in the database with the provided deviceId

DeviceRegistryRepository ( IDocumentDBClient documentClient ) : System
GetDeviceAsync ( string deviceId ) : Task

Queries the DocumentDB and retrieves the device based on its deviceId

GetDeviceList ( Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.Models.DeviceListQuery query ) : Task
RemoveDeviceAsync ( string deviceId ) : System.Threading.Tasks.Task
UpdateDeviceAsync ( DeviceModel device ) : Task

Updates an existing device in the DocumentDB Throws a DeviceNotRegisteredException is the device does not already exist in the DocumentDB

UpdateDeviceEnabledStatusAsync ( string deviceId, bool isEnabled ) : Task

Приватные методы

Метод Описание
GetAllDevicesAsync ( ) : Task>

Queries the DocumentDB and retrieves all documents in the collection

SearchDeviceList ( IQueryable deviceList, string search ) : IQueryable
SearchTypePropertiesForValue ( DeviceModel device, string search ) : bool
SortDeviceList ( IQueryable deviceList, string sortColumn, QuerySortOrder sortOrder ) : IQueryable

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

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

Adds a device to the DocumentDB. Throws a DeviceAlreadyRegisteredException if a device already exists in the database with the provided deviceId
public AddDeviceAsync ( DeviceModel device ) : Task
device Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Models.DeviceModel
Результат Task

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

public DeviceRegistryRepository ( IDocumentDBClient documentClient ) : System
documentClient IDocumentDBClient
Результат System

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

Queries the DocumentDB and retrieves the device based on its deviceId
public GetDeviceAsync ( string deviceId ) : Task
deviceId string DeviceID of the device to retrieve
Результат Task

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

public GetDeviceList ( Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.Models.DeviceListQuery query ) : Task
query Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.Models.DeviceListQuery
Результат Task

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

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

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

Updates an existing device in the DocumentDB Throws a DeviceNotRegisteredException is the device does not already exist in the DocumentDB
public UpdateDeviceAsync ( DeviceModel device ) : Task
device Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Models.DeviceModel
Результат Task

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

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