public static IMqttApplication CreateThrowsDuringRequestProcessing(Func <Exception> exceptionFactory)
 => new MqttApplicationBuilder()
 .Use(MqttRequestDelegateHelper.Throws(exceptionFactory))
 .Build();
Example #2
0
 public void ConfigureMqttApplication(IMqttApplicationBuilder mqttApplicationBuilder)
 {
     mqttApplicationBuilder.Map(
         $"test/builder_{BuilderNumber}/build_{BuildCount++}",
         MqttRequestDelegateHelper.Throws(() => new Exception($"{InvocationCount++}")));
 }