Skip to content

Commit

Permalink
Update MauiProgram.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Sep 12, 2024
1 parent b455515 commit 1fa37ac
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ProjectTemplates/ShinyApp/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,20 @@ public static MauiApp CreateMauiApp()
builder.Services.AddBattery();
#endif
#if shinymediator
builder.Services.AddShinyMediator(x => x
builder.Services.AddShinyMediator(x => x
.AddMemoryCaching()
.AddDataAnnotations()
.AddResiliencyMiddleware(
("Default", pipeline =>
{
pipeline.AddRetry(new RetryStrategyOptions
{
MaxRetryAttempts = 2,
MaxDelay = TimeSpan.FromSeconds(1.0),
});
pipeline.AddTimeout(TimeSpan.FromSeconds(5));
})
)
#if shinyframework
.AddPrismSupport()
#endif
Expand Down

0 comments on commit 1fa37ac

Please sign in to comment.