Simplify apps by moving some commonly used types into Microsoft.AspNetCore.Blazor namespace

This commit is contained in:
Steve Sanderson 2018-02-28 11:27:37 +00:00
parent 1d5dfc2fbd
commit 4bd3cd98d6
13 changed files with 19 additions and 16 deletions

View File

@ -1,5 +1,4 @@
@using Microsoft.AspNetCore.Blazor.Routing
<!--
<!--
Configuring this stuff here is temporary. Later we'll move the app config
into Program.cs, and it won't be necessary to specify AppAssembly.
-->

View File

@ -1,5 +1,4 @@
@using Microsoft.AspNetCore.Blazor
@using Microsoft.AspNetCore.Blazor.Browser.Services.Temporary
@using Microsoft.AspNetCore.Blazor.Browser.Services.Temporary
@inject HttpClient Http
<h1>Weather forecast</h1>

View File

@ -1 +1 @@
@(Layout<StandaloneApp.Shared.MainLayout>())
@(Layout<MainLayout>())

View File

@ -1,5 +1,4 @@
@using Microsoft.AspNetCore.Blazor.RenderTree
@(Implements<Microsoft.AspNetCore.Blazor.Layouts.ILayoutComponent>())
@(Implements<ILayoutComponent>())
<div class='container-fluid'>
<div class='row'>

View File

@ -1,5 +1,4 @@
@using Microsoft.AspNetCore.Blazor.Routing
<div class='main-nav'>
<div class='main-nav'>
<div class='navbar navbar-inverse'>
<div class='navbar-header'>
<button type='button' class='navbar-toggle' data-toggle='collapse' data-target='.navbar-collapse'>

View File

@ -0,0 +1,5 @@
@using Microsoft.AspNetCore.Blazor
@using Microsoft.AspNetCore.Blazor.Layouts
@using Microsoft.AspNetCore.Blazor.Routing
@using StandaloneApp
@using StandaloneApp.Shared

View File

@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Blazor.Razor
/// </summary>
internal class ScopeStack
{
private const string _renderFragmentTypeName = "Microsoft.AspNetCore.Blazor.RenderTree.RenderFragment";
private const string _renderFragmentTypeName = "Microsoft.AspNetCore.Blazor.RenderFragment";
private readonly Stack<ScopeEntry> _stack = new Stack<ScopeEntry>();
private int _builderVarNumber = 1;

View File

@ -1,7 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Blazor.RenderTree
using Microsoft.AspNetCore.Blazor.RenderTree;
namespace Microsoft.AspNetCore.Blazor
{
/// <summary>
/// Represents a segment of UI content, implemented as a delegate that

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Blazor.RenderTree
namespace Microsoft.AspNetCore.Blazor
{
/// <summary>
/// Supplies information about an event that is being raised.

View File

@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Blazor.RenderTree
namespace Microsoft.AspNetCore.Blazor
{
/// <summary>
/// Handles an event raised for a <see cref="RenderTreeFrame"/>.

View File

@ -265,7 +265,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
@functions {
public bool HandlerWasCalled { get; set; } = false;
void MyHandleEvent(Microsoft.AspNetCore.Blazor.RenderTree.UIEventArgs eventArgs)
void MyHandleEvent(Microsoft.AspNetCore.Blazor.UIEventArgs eventArgs)
{
HandlerWasCalled = true;
}

View File

@ -1,5 +1,5 @@
@using System.Collections.Generic
@using Microsoft.AspNetCore.Blazor.RenderTree
@using Microsoft.AspNetCore.Blazor
Type here: <input onkeypress=@OnKeyPressed />
<ul>
@foreach (var key in keysPressed)

View File

@ -1,4 +1,4 @@
@using Microsoft.AspNetCore.Blazor.RenderTree
@using Microsoft.AspNetCore.Blazor
<div>
<p>Fragment will be toggled below</p>