Skip to content

Commit 9bbc1fd

Browse files
author
Boris
committed
Refactor solution, add blazor server demo
1 parent 58a8871 commit 9bbc1fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+312
-104
lines changed

SimpleBlazorMultiselect.sln

Lines changed: 86 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,105 @@
1-
Microsoft Visual Studio Solution File, Format Version 12.00
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
23
# Visual Studio Version 17
34
VisualStudioVersion = 17.9.34728.123
45
MinimumVisualStudioVersion = 10.0.40219.1
56
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{49DA0B6E-92AE-41C0-8763-16D0303F2015}"
67
EndProject
7-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleBlazorMultiselect", "src\SimpleBlazorMultiselect\SimpleBlazorMultiselect.csproj", "{1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}"
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
89
EndProject
9-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleBlazorMultiselect.Demo", "src\SimpleBlazorMultiselect.Demo\SimpleBlazorMultiselect.Demo.csproj", "{025632E8-CB51-4E49-B47C-B9C75D35A874}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect", "src\SimpleBlazorMultiselect\SimpleBlazorMultiselect.csproj", "{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}"
1011
EndProject
11-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect.Tests", "src\SimpleBlazorMultiselect.Tests\SimpleBlazorMultiselect.Tests.csproj", "{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}"
12+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
13+
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect.Tests", "tests\SimpleBlazorMultiselect.Tests\SimpleBlazorMultiselect.Tests.csproj", "{D69FB0BD-6BA3-4789-9278-E01AC2A49919}"
15+
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "demo", "demo", "{A39C23D2-F2C0-258D-165A-CF1E7FEE6E7B}"
17+
EndProject
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect.Demo.Wasm", "demo\SimpleBlazorMultiselect.Demo.Wasm\SimpleBlazorMultiselect.Demo.Wasm.csproj", "{8505F798-2740-4D5C-A94C-B75E79980E0B}"
19+
EndProject
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect.Demo.Server", "demo\SimpleBlazorMultiselect.Demo.Server\SimpleBlazorMultiselect.Demo.Server.csproj", "{71E4E57A-A40F-459B-BB41-A26EB10D2841}"
21+
EndProject
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect.Demo.Shared", "demo\SimpleBlazorMultiselect.Demo.Shared\SimpleBlazorMultiselect.Demo.Shared.csproj", "{35CEC199-EE74-4A2E-8E18-0F695B667D46}"
1223
EndProject
1324
Global
1425
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1526
Debug|Any CPU = Debug|Any CPU
27+
Debug|x64 = Debug|x64
28+
Debug|x86 = Debug|x86
1629
Release|Any CPU = Release|Any CPU
30+
Release|x64 = Release|x64
31+
Release|x86 = Release|x86
1732
EndGlobalSection
1833
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{49DA0B6E-92AE-41C0-8763-16D0303F2015}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{49DA0B6E-92AE-41C0-8763-16D0303F2015}.Release|Any CPU.ActiveCfg = Release|Any CPU
21-
{1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22-
{1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}.Debug|Any CPU.Build.0 = Debug|Any CPU
23-
{1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}.Release|Any CPU.ActiveCfg = Release|Any CPU
24-
{1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}.Release|Any CPU.Build.0 = Release|Any CPU
25-
{025632E8-CB51-4E49-B47C-B9C75D35A874}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26-
{025632E8-CB51-4E49-B47C-B9C75D35A874}.Debug|Any CPU.Build.0 = Debug|Any CPU
27-
{025632E8-CB51-4E49-B47C-B9C75D35A874}.Release|Any CPU.ActiveCfg = Release|Any CPU
28-
{025632E8-CB51-4E49-B47C-B9C75D35A874}.Release|Any CPU.Build.0 = Release|Any CPU
29-
{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30-
{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
31-
{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
32-
{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}.Release|Any CPU.Build.0 = Release|Any CPU
34+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
36+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Debug|x64.ActiveCfg = Debug|Any CPU
37+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Debug|x64.Build.0 = Debug|Any CPU
38+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Debug|x86.ActiveCfg = Debug|Any CPU
39+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Debug|x86.Build.0 = Debug|Any CPU
40+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
41+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Release|Any CPU.Build.0 = Release|Any CPU
42+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Release|x64.ActiveCfg = Release|Any CPU
43+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Release|x64.Build.0 = Release|Any CPU
44+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Release|x86.ActiveCfg = Release|Any CPU
45+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF}.Release|x86.Build.0 = Release|Any CPU
46+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Debug|x64.ActiveCfg = Debug|Any CPU
49+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Debug|x64.Build.0 = Debug|Any CPU
50+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Debug|x86.ActiveCfg = Debug|Any CPU
51+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Debug|x86.Build.0 = Debug|Any CPU
52+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Release|Any CPU.ActiveCfg = Release|Any CPU
53+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Release|Any CPU.Build.0 = Release|Any CPU
54+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Release|x64.ActiveCfg = Release|Any CPU
55+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Release|x64.Build.0 = Release|Any CPU
56+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Release|x86.ActiveCfg = Release|Any CPU
57+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919}.Release|x86.Build.0 = Release|Any CPU
58+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
60+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Debug|x64.ActiveCfg = Debug|Any CPU
61+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Debug|x64.Build.0 = Debug|Any CPU
62+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Debug|x86.ActiveCfg = Debug|Any CPU
63+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Debug|x86.Build.0 = Debug|Any CPU
64+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
65+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Release|Any CPU.Build.0 = Release|Any CPU
66+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Release|x64.ActiveCfg = Release|Any CPU
67+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Release|x64.Build.0 = Release|Any CPU
68+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Release|x86.ActiveCfg = Release|Any CPU
69+
{8505F798-2740-4D5C-A94C-B75E79980E0B}.Release|x86.Build.0 = Release|Any CPU
70+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
71+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Debug|Any CPU.Build.0 = Debug|Any CPU
72+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Debug|x64.ActiveCfg = Debug|Any CPU
73+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Debug|x64.Build.0 = Debug|Any CPU
74+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Debug|x86.ActiveCfg = Debug|Any CPU
75+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Debug|x86.Build.0 = Debug|Any CPU
76+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Release|Any CPU.ActiveCfg = Release|Any CPU
77+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Release|Any CPU.Build.0 = Release|Any CPU
78+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Release|x64.ActiveCfg = Release|Any CPU
79+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Release|x64.Build.0 = Release|Any CPU
80+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Release|x86.ActiveCfg = Release|Any CPU
81+
{71E4E57A-A40F-459B-BB41-A26EB10D2841}.Release|x86.Build.0 = Release|Any CPU
82+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
83+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Debug|Any CPU.Build.0 = Debug|Any CPU
84+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Debug|x64.ActiveCfg = Debug|Any CPU
85+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Debug|x64.Build.0 = Debug|Any CPU
86+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Debug|x86.ActiveCfg = Debug|Any CPU
87+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Debug|x86.Build.0 = Debug|Any CPU
88+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Release|Any CPU.ActiveCfg = Release|Any CPU
89+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Release|Any CPU.Build.0 = Release|Any CPU
90+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Release|x64.ActiveCfg = Release|Any CPU
91+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Release|x64.Build.0 = Release|Any CPU
92+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Release|x86.ActiveCfg = Release|Any CPU
93+
{35CEC199-EE74-4A2E-8E18-0F695B667D46}.Release|x86.Build.0 = Release|Any CPU
3394
EndGlobalSection
3495
GlobalSection(SolutionProperties) = preSolution
3596
HideSolutionNode = FALSE
3697
EndGlobalSection
98+
GlobalSection(NestedProjects) = preSolution
99+
{223C122B-FEFB-4AB0-8EF8-ED2BB94378CF} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
100+
{D69FB0BD-6BA3-4789-9278-E01AC2A49919} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
101+
{8505F798-2740-4D5C-A94C-B75E79980E0B} = {A39C23D2-F2C0-258D-165A-CF1E7FEE6E7B}
102+
{71E4E57A-A40F-459B-BB41-A26EB10D2841} = {A39C23D2-F2C0-258D-165A-CF1E7FEE6E7B}
103+
{35CEC199-EE74-4A2E-8E18-0F695B667D46} = {A39C23D2-F2C0-258D-165A-CF1E7FEE6E7B}
104+
EndGlobalSection
37105
EndGlobal

build/Build.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,21 @@ class Build : NukeBuild
5151

5252
[Solution] readonly Solution Solution;
5353

54-
AbsolutePath SourceDirectory => RootDirectory / "src";
5554
AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts";
5655
AbsolutePath TempDirectory => RootDirectory / "temp";
5756
AbsolutePath DemoDirectory => TempDirectory / "demo";
5857

59-
Project LibProject => Solution.GetProject("SimpleBlazorMultiselect");
60-
Project DemoProject => Solution.GetProject("SimpleBlazorMultiselect.Demo");
61-
Project TestsProject => Solution.GetProject("SimpleBlazorMultiselect.Tests");
58+
Project LibProject => Solution.GetAllProjects("*").Single(x => x.Name == "SimpleBlazorMultiselect");
59+
Project DemoProject => Solution.GetAllProjects("*").Single(x => x.Name == "SimpleBlazorMultiselect.Demo.Wasm");
60+
Project TestsProject => Solution.GetAllProjects("*").Single(x => x.Name == "SimpleBlazorMultiselect.Tests");
6261

6362
Target Clean => _ => _
6463
.Before(Restore)
6564
.Executes(() =>
6665
{
6766
TempDirectory.CreateOrCleanDirectory();
6867
DemoDirectory.CreateOrCleanDirectory();
69-
SourceDirectory.GlobDirectories("**/bin", "**/obj")
68+
RootDirectory.GlobDirectories("**/bin", "**/obj")
7069
.ForEach(path =>
7170
{
7271
Console.WriteLine($"Removing '{path}'");
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@using SimpleBlazorMultiselect.Demo.Shared
2+
@using SimpleBlazorMultiselect.Demo.Shared.Layout
3+
<CascadingValue Name="Standalone" Value="@false" IsFixed="@true">
4+
<Router AppAssembly="@typeof(App).Assembly" AdditionalAssemblies="@(new[] { typeof(Globals).Assembly })">
5+
<Found Context="routeData">
6+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
7+
<FocusOnNavigate RouteData="@routeData" Selector="h1"/>
8+
</Found>
9+
<NotFound>
10+
<PageTitle>Not found</PageTitle>
11+
<LayoutView Layout="@typeof(MainLayout)">
12+
<p role="alert">Sorry, there's nothing at this address.</p>
13+
</LayoutView>
14+
</NotFound>
15+
</Router>
16+
</CascadingValue>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
@page "/"
2+
@using Microsoft.AspNetCore.Components.Web
3+
@namespace SimpleBlazorMultiselect.Demo.Server.Pages
4+
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
5+
6+
<!DOCTYPE html>
7+
<html lang="en">
8+
<head>
9+
<meta charset="utf-8" />
10+
<base href="~/" />
11+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
12+
<link href="_content/SimpleBlazorMultiselect.Demo.Shared/app.css" rel="stylesheet" />
13+
<link href="SimpleBlazorMultiselect.Demo.Server.styles.css" rel="stylesheet"/>
14+
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
15+
</head>
16+
<body>
17+
<component type="typeof(App)" render-mode="ServerPrerendered" />
18+
19+
<div id="blazor-error-ui">
20+
<environment include="Staging,Production">
21+
An error has occurred. This application may no longer respond until reloaded.
22+
</environment>
23+
<environment include="Development">
24+
An unhandled exception has occurred. See browser dev tools for details.
25+
</environment>
26+
<a href="" class="reload">Reload</a>
27+
<a class="dismiss">🗙</a>
28+
</div>
29+
30+
<script src="_framework/blazor.server.js"></script>
31+
</body>
32+
</html>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using Microsoft.AspNetCore.Components;
2+
using Microsoft.AspNetCore.Components.Web;
3+
4+
var builder = WebApplication.CreateBuilder(args);
5+
builder.Services.AddRazorPages();
6+
builder.Services.AddServerSideBlazor();
7+
8+
var app = builder.Build();
9+
10+
if (!app.Environment.IsDevelopment())
11+
{
12+
app.UseHsts();
13+
}
14+
15+
app.UseHttpsRedirection();
16+
17+
app.UseStaticFiles();
18+
19+
app.UseRouting();
20+
21+
app.MapBlazorHub();
22+
app.MapFallbackToPage("/_Host");
23+
24+
app.Run();
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"iisSettings": {
3+
"iisExpress": {
4+
"applicationUrl": "http://localhost:36159",
5+
"sslPort": 44369
6+
}
7+
},
8+
"profiles": {
9+
"http": {
10+
"commandName": "Project",
11+
"dotnetRunMessages": true,
12+
"launchBrowser": true,
13+
"applicationUrl": "http://localhost:5108",
14+
"environmentVariables": {
15+
"ASPNETCORE_ENVIRONMENT": "Development"
16+
}
17+
},
18+
"https": {
19+
"commandName": "Project",
20+
"dotnetRunMessages": true,
21+
"launchBrowser": true,
22+
"applicationUrl": "https://localhost:7130;http://localhost:5108",
23+
"environmentVariables": {
24+
"ASPNETCORE_ENVIRONMENT": "Development"
25+
}
26+
},
27+
"IIS Express": {
28+
"commandName": "IISExpress",
29+
"launchBrowser": true,
30+
"environmentVariables": {
31+
"ASPNETCORE_ENVIRONMENT": "Development"
32+
}
33+
}
34+
}
35+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="..\SimpleBlazorMultiselect.Demo.Shared\SimpleBlazorMultiselect.Demo.Shared.csproj" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<_ContentIncludedByDefault Remove="Layout\MainLayout.razor" />
15+
<_ContentIncludedByDefault Remove="Layout\NavMenu.razor" />
16+
<_ContentIncludedByDefault Remove="wwwroot\css\site.css" />
17+
</ItemGroup>
18+
</Project>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@using Microsoft.AspNetCore.Components.Routing
2+
@using Microsoft.AspNetCore.Components.Web
3+
@using Microsoft.JSInterop
4+
@using SimpleBlazorMultiselect.Demo.Server
5+
@using SimpleBlazorMultiselect
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"DetailedErrors": true,
3+
"Logging": {
4+
"LogLevel": {
5+
"Default": "Information",
6+
"Microsoft.AspNetCore": "Warning"
7+
}
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
},
8+
"AllowedHosts": "*"
9+
}

0 commit comments

Comments
 (0)