Interface IAssetFileMonitor
- Namespace
- Azure.Iot.Operations.Connector.Files
- Assembly
- Azure.Iot.Operations.Connector.dll
public interface IAssetFileMonitor
Methods
GetAssetNames(string, string)
List the names of all assets within the provided endpoint within the provided device.
IEnumerable<string> GetAssetNames(string deviceName, string inboundEndpointName)
Parameters
deviceName
stringThe name of the device to get asset names from.
inboundEndpointName
stringThe name of the endpoint within the provided device to get asset names from.
Returns
- IEnumerable<string>
The collection of asset names associated with the provided endpoint in the provided device. This collection is empty if the device does not exist or if the device has no inbound endpoint with the provided name or if both the device and inbound endpoint exist, but they have no assets.
GetDeviceNames()
List the names of all devices.
IEnumerable<string> GetDeviceNames()
Returns
GetEndpointCredentials(string, string, InboundEndpointSchemaMapValue)
Get the file-mounted credentials for the provided inbound endpoint.
EndpointCredentials GetEndpointCredentials(string deviceName, string inboundEndpointName, InboundEndpointSchemaMapValue inboundEndpoint)
Parameters
deviceName
stringThe name of the device whose inbound endpoint credentials should be retrieved.
inboundEndpointName
stringThe name of the inbound endpoint whose credentials should be retrieved.
inboundEndpoint
InboundEndpointSchemaMapValueThe endpoint whose credentials should be returned.
Returns
- EndpointCredentials
The credentials for the endpoint
GetInboundEndpointNames(string)
List the names of inbound endpoints associated with the provided device name.
IEnumerable<string> GetInboundEndpointNames(string deviceName)
Parameters
deviceName
stringThe device whose inbound endpoint names will be listed.
Returns
- IEnumerable<string>
The collection of inbound endpoint names associated with this device. This collection is empty if the device doesn't exist.
ObserveAssets(string, string)
Start observing changes to assets for the given endpoint within the given device.
void ObserveAssets(string deviceName, string inboundEndpointName)
Parameters
deviceName
stringThe name of the device to observe asset changes within
inboundEndpointName
stringThe name of the endpoint within the device to observe asset changes within
ObserveDevices()
Start observing changes to all devices.
void ObserveDevices()
UnobserveAll()
Stop all observation of assets and/or devices.
void UnobserveAll()
UnobserveAssets(string, string)
Stop observing changes to assets for the given endpoint within the given device.
void UnobserveAssets(string deviceName, string inboundEndpointName)
Parameters
deviceName
stringThe name of the device to stop observing asset changes within
inboundEndpointName
stringThe name of the endpoint within the device to stop observing asset changes within
UnobserveDevices()
Stop observing changes to all devices.
void UnobserveDevices()
Events
AssetFileChanged
Executes whenever an asset is added to or removed from an existing device after observing asset changes with ObserveAssets(string, string).
event EventHandler<AssetFileChangedEventArgs>? AssetFileChanged
Event Type
DeviceFileChanged
Executes whenever a device file is created or deleted after observing device changes with ObserveDevices().
event EventHandler<DeviceFileChangedEventArgs>? DeviceFileChanged