In a JSON file, appsettings can be a nested heirachy, e.g.
{
"Top": {
"Second": {
"Key": "value"
}
}
@if(IsValid) | |
{ | |
<a href=@dataUrl download=@Filename >@ChildContent</a> | |
} | |
@code | |
{ | |
[Parameter] public DateTime? Start { get; set; } | |
[Parameter] public DateTime? End { get; set; } |
@* need to change project SDK *@ | |
<Project Sdk="Microsoft.NET.Sdk.Razor"> | |
@* add bUnit package *@ | |
<PackageReference Include="bunit" Verion="x.x.x" /> | |
@* Use a `@code` block in a `.razor` test file, e.g. *@ | |
@* if the test component inherits from `TestContext ` you don't need the `new TestContext();` bit | |
@code { |
using NuGet.Common; | |
using NuGet.Configuration; | |
using NuGet.Credentials; | |
using NuGet.PackageManagement; | |
using NuGet.Packaging; | |
using NuGet.Packaging.Core; | |
using NuGet.Packaging.Signing; | |
using NuGet.ProjectManagement; | |
using NuGet.Protocol; | |
using NuGet.Protocol.Core.Types; |
@* Creates a Gravatar image using Bootstrap styling from email address *@ | |
<img class="rounded-circle" src="@url" /> | |
@code | |
{ | |
[Parameter] public string Email { get; set; } | |
[Parameter] public int Size { get; set; } = 24; | |
protected override void OnParametersSet() | |
{ | |
// create hash |
@using Microsoft.Extensions.Hosting | |
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env | |
@if (isDevelopment) | |
{ | |
@ChildContent | |
} | |
@code { | |
[Parameter] public RenderFragment ChildContent { get; set; } |
<button class="btn btn-primary" @onclick="@ModalShow">Show Dialog!</button> | |
@if (showModal) | |
{ | |
<div class="modal fade show" id="myModal" style="display:block" aria-modal="true" role="dialog"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<!-- Modal Header --> | |
<div class="modal-header"> |