Table of Contents

Class DeviceDiscoveryService.Service

Namespace
Azure.Iot.Operations.Services.AssetAndDeviceRegistry.DeviceDiscoveryService
Assembly
Azure.Iot.Operations.Services.dll
public abstract class DeviceDiscoveryService.Service : IAsyncDisposable
Inheritance
DeviceDiscoveryService.Service
Implements
Inherited Members

Constructors

Service(ApplicationContext, IMqttPubSubClient, Dictionary<string, string>?)

Construct a new instance of this service.

public Service(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, Dictionary<string, string>? topicTokenMap = null)

Parameters

applicationContext ApplicationContext

The shared context for your application.

mqttClient IMqttPubSubClient

The MQTT client to use.

topicTokenMap Dictionary<string, string>

The topic token replacement map to use for all operations by default. Generally, this will include the token values for topic tokens such as "modelId" which should be the same for the duration of this service's lifetime. Note that additional topic tokens can be specified per-telemetry message.

Properties

CreateOrUpdateDiscoveredDeviceCommandExecutor

public DeviceDiscoveryService.CreateOrUpdateDiscoveredDeviceCommandExecutor CreateOrUpdateDiscoveredDeviceCommandExecutor { get; }

Property Value

DeviceDiscoveryService.CreateOrUpdateDiscoveredDeviceCommandExecutor

Methods

CreateOrUpdateDiscoveredDeviceAsync(CreateOrUpdateDiscoveredDeviceRequestPayload, CommandRequestMetadata, CancellationToken)

public abstract Task<ExtendedResponse<CreateOrUpdateDiscoveredDeviceResponsePayload>> CreateOrUpdateDiscoveredDeviceAsync(CreateOrUpdateDiscoveredDeviceRequestPayload request, CommandRequestMetadata requestMetadata, CancellationToken cancellationToken)

Parameters

request CreateOrUpdateDiscoveredDeviceRequestPayload
requestMetadata CommandRequestMetadata
cancellationToken CancellationToken

Returns

Task<ExtendedResponse<CreateOrUpdateDiscoveredDeviceResponsePayload>>

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Returns

ValueTask

A task that represents the asynchronous dispose operation.

DisposeAsync(bool)

public ValueTask DisposeAsync(bool disposing)

Parameters

disposing bool

Returns

ValueTask

StartAsync(int?, CancellationToken)

Begin accepting command invocations for all command executors.

public Task StartAsync(int? preferredDispatchConcurrency = null, CancellationToken cancellationToken = default)

Parameters

preferredDispatchConcurrency int?

The dispatch concurrency count for the command response cache to use.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

StopAsync(CancellationToken)

public Task StopAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task