├── src ├── Sample │ └── BlazorServersideTest │ │ ├── Pages │ │ ├── Index.razor │ │ ├── Counter.razor │ │ ├── Error.razor │ │ ├── _Host.cshtml │ │ └── FetchData.razor │ │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── css │ │ │ ├── open-iconic │ │ │ │ ├── font │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ │ ├── open-iconic.woff │ │ │ │ │ │ └── open-iconic.svg │ │ │ │ │ └── css │ │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── FONT-LICENSE │ │ │ └── site.css │ │ └── preview.html │ │ ├── appsettings.json │ │ ├── appsettings.Development.json │ │ ├── BlazorServersideTest.csproj │ │ ├── Shared │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ │ ├── Data │ │ ├── WeatherForecast.cs │ │ └── WeatherForecastService.cs │ │ ├── _Imports.razor │ │ ├── App.razor │ │ ├── Program.cs │ │ ├── BlazorServersideTest.sln │ │ └── Startup.cs └── RazorComponentsPreview │ ├── Htmlizer │ ├── ComponentRenderedText.cs │ ├── HttpNavigationManager.cs │ ├── UnsupportedJavaScriptRuntime.cs │ ├── RenderedComponentInstance.cs │ ├── TestHost.cs │ ├── TestRenderer.cs │ ├── ContainerComponent.cs │ └── Htmlizer.cs │ ├── RazorComponentsPreview.csproj │ └── Razor │ ├── NotFoundProjectItem.cs │ ├── TestRazorProjectItem.cs │ ├── DefaultRazorProjectItem.cs │ ├── TestRazorProjectFileSystem.cs │ ├── RazorRuntimeCompilationExtensions.cs │ ├── DefaultRazorProjectFileSystem.cs │ ├── Generator.cs │ └── RuntimeComponentsGenerator.cs ├── README.md └── .gitignore /src/Sample/BlazorServersideTest/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |
Current count: @currentCount
6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Sample/BlazorServersideTest/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |Sorry, there's nothing at this address.
8 |9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |
11 |12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |
-------------------------------------------------------------------------------- /src/Sample/BlazorServersideTest/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Hosting; 10 | using Microsoft.Extensions.Logging; 11 | 12 | namespace BlazorServersideTest 13 | { 14 | public class Program 15 | { 16 | public static void Main(string[] args) 17 | { 18 | CreateHostBuilder(args).Build().Run(); 19 | } 20 | 21 | public static IHostBuilder CreateHostBuilder(string[] args) => 22 | Host.CreateDefaultBuilder(args) 23 | .ConfigureWebHostDefaults(webBuilder => 24 | { 25 | webBuilder.UseStartupThisssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssce.
9 | @if (forecasts == null) 10 | { 11 |Loading...
12 | } 13 | else 14 | { 15 || 19 | | Temp. (C) | 20 |Temp. (F) | 21 |Summary | 22 |
|---|---|---|---|
| @forecast.Date.ToShortDateString() | 29 |@forecast.TemperatureC | 30 |@forecast.TemperatureF | 31 |@forecast.Summary | 32 |