Table of Contents

Class AssetAvailableEventArgs

Namespace
Azure.Iot.Operations.Connector
Assembly
Azure.Iot.Operations.Connector.dll

The event args for when an asset becomes available to sample.

public class AssetAvailableEventArgs : EventArgs, IDisposable
Inheritance
AssetAvailableEventArgs
Implements
Inherited Members

Properties

Asset

The asset that is now available to sample.

public Asset Asset { get; }

Property Value

Asset

AssetClient

The client to use to send status updates for assets on and to use to forward sampled datasets/received events with.

public AssetClient AssetClient { get; }

Property Value

AssetClient

AssetName

The name of the asset that is now available to sample.

public string AssetName { get; }

Property Value

string

Device

The device that this asset belongs to.

public Device Device { get; }

Property Value

Device

DeviceEndpointClient

The client to use to send status updates for this asset's device on.

public DeviceEndpointClient DeviceEndpointClient { get; }

Property Value

DeviceEndpointClient

DeviceName

The name of the device that this asset belongs to.

public string DeviceName { get; }

Property Value

string

InboundEndpointName

The name of the endpoint that this asset belongs to.

public string InboundEndpointName { get; }

Property Value

string

LeaderElectionClient

The leader election client used by this connector. It is null if and only if this connector isn't configured to do leader election.

public ILeaderElectionClient? LeaderElectionClient { get; }

Property Value

ILeaderElectionClient

Remarks

When configured to use leader election, ConnectorWorker automatically subscribes to notifications about leadership position changes using this client and will automatically trigger the cancellation token provided in WhileAssetIsAvailable if it detects that this connector is no longer the leader.

This client can still be used within WhileAssetIsAvailable to check the leadership position manually, though.

Users should not attempt to close or dispose this client as the connector will do that for you when appropriate.

Methods

Dispose()

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

public void Dispose()