C# 클래스 Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.Repository.DeviceRegistryRepository

상속: IDeviceRegistryCrudRepository, IDeviceRegistryListRepository
파일 보기 프로젝트 열기: Azure/azure-iot-remote-monitoring 1 사용 예제들

공개 메소드들

메소드 설명
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