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
Factory
public static Func<IServiceProvider, IMessageSchemaProvider> Factory
Field Value
Methods
GetMessageSchemaAsync(Device, Asset, string, AssetDataset, 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(Device device, Asset asset, string datasetName, AssetDataset dataset, CancellationToken cancellationToken = default)
Parameters
deviceDeviceThe device this dataset will be sampled from.
assetAssetThe asset this dataset belongs to.
datasetNamestringThe name of the dataset.
datasetAssetDatasetThe dataset.
cancellationTokenCancellationTokenCancellation 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(Device, Asset, string, AssetEvent, 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(Device device, Asset asset, string eventName, AssetEvent assetEvent, CancellationToken cancellationToken = default)
Parameters
deviceDeviceThe device this event will be received from.
assetAssetThe asset this event belongs to.
eventNamestringThe name of the event.
assetEventAssetEventThe event
cancellationTokenCancellationTokenCancellation 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.