MessagesClient.ErrorProcessor プロパティ

定義

接続が失われたときに実行されるコールバック。

public Action<Microsoft.Azure.Devices.ErrorContext> ErrorProcessor { get; set; }
member this.ErrorProcessor : Action<Microsoft.Azure.Devices.ErrorContext> with get, set
Public Property ErrorProcessor As Action(Of ErrorContext)

プロパティ値

serviceClient.Messaging.ErrorProcessor = OnConnectionLost;serviceClient.Messaging.OpenAsync();

//...

public void OnConnectionLost(ErrorContext errorContext) { // 必要に応じて再接続ロジックを追加 Console.WriteLine("Messaging client connection lost") }

適用対象