Table of Contents

Class NoMessageSchemaProvider

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

An implementation of IMessageSchemaProvider where no datasets or events will register a message schema.

public class NoMessageSchemaProvider : IMessageSchemaProvider
Inheritance
NoMessageSchemaProvider
Implements
Inherited Members

Fields

NoMessageSchemaProviderFactory

public static Func<IServiceProvider, IMessageSchemaProvider> NoMessageSchemaProviderFactory

Field Value

Func<IServiceProvider, IMessageSchemaProvider>

Methods

GetMessageSchemaAsync(AssetEndpointProfile, Asset, string, Dataset, CancellationToken)

Get the message schema associated with this dataset. If provided, the connector will register this message schema prior to forwarding any dataset telemetry for this dataset..

public Task<ConnectorMessageSchema?> GetMessageSchemaAsync(AssetEndpointProfile assetEndpointProfile, Asset asset, string datasetName, Dataset dataset, CancellationToken cancellationToken = default)

Parameters

assetEndpointProfile AssetEndpointProfile

The asset endpoint profile this dataset will be sampled from.

asset Asset

The asset this dataset belongs to.

datasetName string

The name of the dataset.

dataset Dataset

The dataset.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ConnectorMessageSchema>

The message schema to register for data sampled from this dataset. If null, no message schema will be registered for this dataset.

GetMessageSchemaAsync(AssetEndpointProfile, Asset, string, Event, CancellationToken)

Get the message schema associated with this event. If provided, the connector will register this message schema prior to forwarding any event telemetry for this event.

public Task<ConnectorMessageSchema?> GetMessageSchemaAsync(AssetEndpointProfile assetEndpointProfile, Asset asset, string eventName, Event assetEvent, CancellationToken cancellationToken = default)

Parameters

assetEndpointProfile AssetEndpointProfile

The asset endpoint profile this event will be received from.

asset Asset

The asset this event belongs to.

eventName string

The name of the event.

assetEvent Event

The event

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ConnectorMessageSchema>

The message schema to register for data received from this event. If null, no message schema will be registered for this event.