Skip to content

Commit e8949b4

Browse files
committed
Revert sample changes
1 parent 5cf10bc commit e8949b4

File tree

4 files changed

+8
-22
lines changed

4 files changed

+8
-22
lines changed

src/Components/Samples/BlazorUnitedApp/App.razor

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
<HeadOutlet />
1515
</head>
1616
<body>
17-
<Routes @rendermode="InteractiveServer" />
17+
<Routes />
1818
<script src="@Assets["_framework/blazor.web.js"]"></script>
19-
<ReconnectModal />
2019
</body>
2120
</html>

src/Components/Samples/BlazorUnitedApp/Pages/FetchData.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<p>This component demonstrates fetching data from a service.</p>
1010

11-
@if (Forecasts == null)
11+
@if (forecasts == null)
1212
{
1313
<p><em>Loading...</em></p>
1414
}
@@ -24,7 +24,7 @@ else
2424
</tr>
2525
</thead>
2626
<tbody>
27-
@foreach (var forecast in Forecasts)
27+
@foreach (var forecast in forecasts)
2828
{
2929
<tr>
3030
<td>@forecast.Date.ToShortDateString()</td>
@@ -38,10 +38,10 @@ else
3838
}
3939

4040
@code {
41-
[SupplyParameterFromPersistentComponentState] public WeatherForecast[] Forecasts { get; set; } = null!;
41+
private WeatherForecast[]? forecasts;
4242

4343
protected override async Task OnInitializedAsync()
4444
{
45-
Forecasts ??= await ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now));
45+
forecasts = await ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now));
4646
}
4747
}

src/Components/Samples/BlazorUnitedApp/Program.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@
33

44
using BlazorUnitedApp;
55
using BlazorUnitedApp.Data;
6-
using Microsoft.AspNetCore.Components.Server.Circuits;
7-
using Microsoft.Extensions.DependencyInjection.Extensions;
86

97
var builder = WebApplication.CreateBuilder(args);
108

119
// Add services to the container.
1210
builder.Services.AddRazorComponents()
1311
.AddInteractiveWebAssemblyComponents()
14-
.AddInteractiveServerComponents(o => o.DisconnectedCircuitMaxRetained = 0);
12+
.AddInteractiveServerComponents();
1513

1614
builder.Services.AddSingleton<WeatherForecastService>();
1715

18-
//builder.Services.TryAddEnumerable(ServiceDescriptor.Scoped<CircuitHandler, CustomCircuitHandler>());
19-
2016
var app = builder.Build();
2117

2218
// Configure the HTTP request pipeline.
@@ -38,12 +34,3 @@
3834
.AddInteractiveWebAssemblyRenderMode();
3935

4036
app.Run();
41-
42-
public class CustomCircuitHandler : CircuitHandler
43-
{
44-
public override async Task OnConnectionUpAsync(Circuit circuit, CancellationToken cancellationToken)
45-
{
46-
await Task.Delay(1000, cancellationToken); // Simulate some async work
47-
circuit.PauseCircuit();
48-
}
49-
}

src/Components/Samples/BlazorUnitedApp/Properties/launchSettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dotnetRunMessages": true,
1414
"launchBrowser": true,
1515
"applicationUrl": "http://localhost:5265",
16-
//"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
16+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
1717
"environmentVariables": {
1818
"ASPNETCORE_ENVIRONMENT": "Development"
1919
}
@@ -22,7 +22,7 @@
2222
"commandName": "Project",
2323
"dotnetRunMessages": true,
2424
"launchBrowser": true,
25-
"applicationUrl": "http://localhost:7247;http://localhost:5265",
25+
"applicationUrl": "https://localhost:7247;http://localhost:5265",
2626
//"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
2727
"environmentVariables": {
2828
"ASPNETCORE_ENVIRONMENT": "Development"

0 commit comments

Comments
 (0)