-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'MarkStega/DualModeDemo'
- Loading branch information
Showing
53 changed files
with
409 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
samples/BlazorMdc.Demo.Blazor/BlazorMdc.Demo.Blazor.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
|
||
<TargetFramework>netstandard2.1</TargetFramework> | ||
<OutputType>Exe</OutputType> | ||
<LangVersion>7.3</LangVersion> | ||
<RazorLangVersion>3.0</RazorLangVersion> | ||
|
||
<Configurations>Debug_CSB;Debug_SSB;Release_CSB;Release_SSB</Configurations> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CSB|AnyCPU'"> | ||
<DefineConstants>ClientSideBlazor;DEBUG;</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SSB|AnyCPU'"> | ||
<DefineConstants>ServerSideBlazor;DEBUG;</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CSB|AnyCPU'"> | ||
<DefineConstants>ClientSideBlazor;RELEASE;</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SSB|AnyCPU'"> | ||
<DefineConstants>ServerSideBlazor;RELEASE</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0-preview2.20160.5" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0-preview2.20160.5" PrivateAssets="all" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0-preview2.20160.5" PrivateAssets="all" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.2.0-preview2.20160.5" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\BlazorMdc.Demo.CommonUI\BlazorMdc.Demo.CommonUI.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using BlazorMdc.Demo.CommonUI; | ||
|
||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
using System.Threading.Tasks; | ||
|
||
namespace BlazorMdc.Demo.Blazor | ||
{ | ||
public class Program | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
var builder = WebAssemblyHostBuilder.CreateDefault(args); | ||
builder.RootComponents.Add<App>("app"); | ||
|
||
builder.Services.AddBaseAddressHttpClient(); | ||
|
||
await builder.Build().RunAsync(); | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
samples/BlazorMdc.Demo.Blazor/Properties/launchSettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:59810/", | ||
"sslPort": 44316 | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"BlazorMdc.Demo.Blazor": { | ||
"commandName": "Project", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
}, | ||
"applicationUrl": "https://localhost:5001;http://localhost:5000" | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
samples/Demonstration/App.razor → samples/BlazorMdc.Demo.CommonUI/App.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
samples/BlazorMdc.Demo.CommonUI/BlazorMdc.Demo.CommonUI.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Razor"> | ||
|
||
<PropertyGroup> | ||
<IsPackable>true</IsPackable> | ||
<LangVersion>7.3</LangVersion> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>BlazorMdc.Demo.CommonUI</RootNamespace> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
|
||
<RazorLangVersion>3.0</RazorLangVersion> | ||
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> | ||
|
||
<Configurations>Debug_CSB;Debug_SSB;Release_CSB;Release_SSB</Configurations> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CSB|AnyCPU'"> | ||
<DefineConstants>ClientSideBlazor;DEBUG;</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SSB|AnyCPU'"> | ||
<DefineConstants>ServerSideBlazor;DEBUG;</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CSB|AnyCPU'"> | ||
<DefineConstants>ClientSideBlazor;RELEASE;</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SSB|AnyCPU'"> | ||
<DefineConstants>ServerSideBlazor;RELEASE</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\BlazorMdc\BlazorMdc.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 1 addition & 9 deletions
10
samples/Demonstration/Pages/Index.razor → ...BlazorMdc.Demo.CommonUI/Pages/Index.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
@page "/" | ||
@using System.Runtime.InteropServices | ||
|
||
|
||
<h1 class="@MdcTypography.Heading3">Hello, world!</h1> | ||
|
||
<p>This sample demonstrates the use of RazorComponents.MaterialDesign components.</p> | ||
|
||
<p>Currently executing on <strong>@runtime</strong>.</p> | ||
<p>Currently executing on <strong>@runtime</strong> built in <strong>@mode</strong> mode.</p> | ||
|
||
|
||
|
||
@for (int i = 0; i < 10; i++) | ||
{ | ||
<p style="margin-top: 5em;">A spacing paragraph to test scrolling and the top menu's scroll behaviour.</p> | ||
} | ||
|
||
@code { | ||
string runtime = RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY")) | ||
? "Mono WebAssembly" | ||
: ".NET Core"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace BlazorMdc.Demo.CommonUI.Pages | ||
{ | ||
public partial class Index | ||
{ | ||
string runtime = RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY")) | ||
? "Mono WebAssembly" | ||
: ".NET Core"; | ||
|
||
string mode; | ||
public Index() | ||
{ | ||
#if DEBUG | ||
mode = "debug"; | ||
#else | ||
mode = "release"; | ||
#endif | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
samples/Demonstration/_Imports.razor → ...es/BlazorMdc.Demo.CommonUI/_Imports.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
@using System.Net.Http | ||
@using Microsoft.AspNetCore.Authorization | ||
@using Microsoft.AspNetCore.Components.Authorization | ||
@using Microsoft.AspNetCore.Components.Forms | ||
@using Microsoft.AspNetCore.Components.Routing | ||
@using Microsoft.AspNetCore.Components.Web | ||
@using Microsoft.JSInterop | ||
@using BlazorMdc.Components | ||
@using Demonstration | ||
@using Demonstration.Shared | ||
@using BlazorMdc.Demo.CommonUI | ||
@using BlazorMdc.Demo.CommonUI.Pages | ||
@using BlazorMdc.Demo.CommonUI.Shared |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions
36
samples/BlazorMdc.Demo.WebServer/BlazorMdc.Demo.WebServer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
|
||
<RootNamespace>BlazorMdc.Demo.WebServer</RootNamespace> | ||
|
||
<Configurations>Debug_CSB;Debug_SSB;Release_CSB;Release_SSB</Configurations> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_CSB|AnyCPU'"> | ||
<DefineConstants>ClientSideBlazor;DEBUG;</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SSB|AnyCPU'"> | ||
<DefineConstants>ServerSideBlazor;DEBUG;</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_CSB|AnyCPU'"> | ||
<DefineConstants>ClientSideBlazor;RELEASE;</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SSB|AnyCPU'"> | ||
<DefineConstants>ServerSideBlazor;RELEASE</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\BlazorMdc.Demo.Blazor\BlazorMdc.Demo.Blazor.csproj" /> | ||
<ProjectReference Include="..\BlazorMdc.Demo.CommonUI\BlazorMdc.Demo.CommonUI.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="3.2.0-preview2.20160.5" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@page "/Error" | ||
|
||
|
||
<h1 class="text-danger">Error.</h1> | ||
<h2 class="text-danger">An error occurred while processing your request.</h2> | ||
|
||
<h3>Development Mode</h3> | ||
<p> | ||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred. | ||
</p> | ||
<p> | ||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong> | ||
It can result in displaying sensitive information from exceptions to end users. | ||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong> | ||
and restarting the app. | ||
</p> |
Oops, something went wrong.