Table of Contents

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 string

The name of the device to get asset names from.

inboundEndpointName string

The 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

IEnumerable<string>

GetEndpointCredentials(string, string, InboundEndpointSchemaMapValue)

Get the file-mounted credentials for the provided inbound endpoint.

EndpointCredentials GetEndpointCredentials(string deviceName, string inboundEndpointName, InboundEndpointSchemaMapValue inboundEndpoint)

Parameters

deviceName string

The name of the device whose inbound endpoint credentials should be retrieved.

inboundEndpointName string

The name of the inbound endpoint whose credentials should be retrieved.

inboundEndpoint InboundEndpointSchemaMapValue

The 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 string

The 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 string

The name of the device to observe asset changes within

inboundEndpointName string

The 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 string

The name of the device to stop observing asset changes within

inboundEndpointName string

The 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

EventHandler<AssetFileChangedEventArgs>

DeviceFileChanged

Executes whenever a device file is created or deleted after observing device changes with ObserveDevices().

event EventHandler<DeviceFileChangedEventArgs>? DeviceFileChanged

Event Type

EventHandler<DeviceFileChangedEventArgs>