Renames for blazor server-side, inclusion in shared framework, and other renaming fixes (#9001)
* Move contents of Microsoft.AspNetCore.Components.Services namespace to Microsoft.AspNetCore.Components * Rename Components to Blazor * Make Blazor server-side part of the shared framework.
This commit is contained in:
parent
98d8b9ab4a
commit
b9e600a45c
|
|
@ -11,7 +11,6 @@
|
|||
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Tasks" ProjectPath="$(RepositoryRoot)src\Mvc\Extensions.ApiDescription.Design\src\Microsoft.Extensions.ApiDescription.Design.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR.Specification.Tests" ProjectPath="$(RepositoryRoot)src\SignalR\server\Specification.Tests\src\Microsoft.AspNetCore.SignalR.Specification.Tests.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Build" ProjectPath="$(RepositoryRoot)src\Components\Blazor\Build\src\Microsoft.AspNetCore.Blazor.Build.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Server" ProjectPath="$(RepositoryRoot)src\Components\Server\src\Microsoft.AspNetCore.Components.Server.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore" ProjectPath="$(RepositoryRoot)src\DefaultBuilder\src\Microsoft.AspNetCore.csproj" RefProjectPath="$(RepositoryRoot)src\DefaultBuilder\ref\Microsoft.AspNetCore.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.JsonPatch" ProjectPath="$(RepositoryRoot)src\Features\JsonPatch\src\Microsoft.AspNetCore.JsonPatch.csproj" RefProjectPath="$(RepositoryRoot)src\Features\JsonPatch\ref\Microsoft.AspNetCore.JsonPatch.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.DataProtection.Abstractions" ProjectPath="$(RepositoryRoot)src\DataProtection\Abstractions\src\Microsoft.AspNetCore.DataProtection.Abstractions.csproj" RefProjectPath="$(RepositoryRoot)src\DataProtection\Abstractions\ref\Microsoft.AspNetCore.DataProtection.Abstractions.csproj" />
|
||||
|
|
@ -130,5 +129,6 @@
|
|||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Server" ProjectPath="$(RepositoryRoot)src\Components\Blazor\Server\src\Microsoft.AspNetCore.Blazor.Server.csproj" RefProjectPath="$(RepositoryRoot)src\Components\Blazor\Server\ref\Microsoft.AspNetCore.Blazor.Server.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Browser" ProjectPath="$(RepositoryRoot)src\Components\Browser\src\Microsoft.AspNetCore.Components.Browser.csproj" RefProjectPath="$(RepositoryRoot)src\Components\Browser\ref\Microsoft.AspNetCore.Components.Browser.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components" ProjectPath="$(RepositoryRoot)src\Components\Components\src\Microsoft.AspNetCore.Components.csproj" RefProjectPath="$(RepositoryRoot)src\Components\Components\ref\Microsoft.AspNetCore.Components.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Server" ProjectPath="$(RepositoryRoot)src\Components\Server\src\Microsoft.AspNetCore.Components.Server.csproj" RefProjectPath="$(RepositoryRoot)src\Components\Server\ref\Microsoft.AspNetCore.Components.Server.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@
|
|||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.Razor" />
|
||||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Abstractions" />
|
||||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.ApiExplorer" />
|
||||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Components.Prerendering" />
|
||||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Core" />
|
||||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.Cors" />
|
||||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" />
|
||||
|
|
@ -87,5 +88,6 @@
|
|||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.Http.Connections" />
|
||||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.SignalR.Core" />
|
||||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.SignalR" />
|
||||
<AspNetCoreAppReference Include="Microsoft.AspNetCore.Components.Server" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.Blazor.Rendering
|
|||
}
|
||||
namespace Microsoft.AspNetCore.Blazor.Services
|
||||
{
|
||||
public partial class WebAssemblyUriHelper : Microsoft.AspNetCore.Components.Services.UriHelperBase
|
||||
public partial class WebAssemblyUriHelper : Microsoft.AspNetCore.Components.UriHelperBase
|
||||
{
|
||||
internal WebAssemblyUriHelper() { }
|
||||
public static readonly Microsoft.AspNetCore.Blazor.Services.WebAssemblyUriHelper Instance;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using Microsoft.AspNetCore.Blazor.Services;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Microsoft.AspNetCore.Blazor.Services
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using Interop = Microsoft.AspNetCore.Components.Browser.BrowserUriHelperInterop;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
<file src="build\**" target="build" />
|
||||
<file src="targets\**" target="targets" />
|
||||
<file src="$publishdir$netcoreapp3.0\**\*" target="tools/" />
|
||||
<file src="..\..\..\Browser.JS\src\dist\components.*.js" target="tools/blazor" />
|
||||
<file src="..\..\..\Browser.JS\src\dist\blazor.*.js" target="tools/blazor" />
|
||||
</files>
|
||||
</package>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<BlazorBuildReferenceFromSource>true</BlazorBuildReferenceFromSource>
|
||||
<BlazorJsPath>$(RepositoryRoot)src\Components\Browser.JS\src\dist\components.*.js</BlazorJsPath>
|
||||
<BlazorJsPath>$(RepositoryRoot)src\Components\Browser.JS\src\dist\blazor.*.js</BlazorJsPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)targets/All.props" />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup Condition="'$(BlazorBuildReferenceFromSource)'==''">
|
||||
<BlazorJsPath>$(MSBuildThisFileDirectory)../tools/blazor/components.*.js</BlazorJsPath>
|
||||
<BlazorJsPath>$(MSBuildThisFileDirectory)../tools/blazor/blazor.*.js</BlazorJsPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="Blazor build outputs">
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
<BlazorBootJsonOutputPath>$(BaseBlazorRuntimeOutputPath)$(BlazorBootJsonName)</BlazorBootJsonOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,5 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<ComponentsPackageVersion>$(PackageVersion)</ComponentsPackageVersion>
|
||||
<VersionPrefix>$(BlazorComponentsVersionPrefix)</VersionPrefix>
|
||||
<PackageVersion>$(VersionPrefix)</PackageVersion>
|
||||
<PackageVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@
|
|||
<body>
|
||||
<app>Loading...</app>
|
||||
|
||||
<script src="_framework/components.webassembly.js"></script>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"groupIdentity": "Microsoft.Web.Blazor.Standalone",
|
||||
"identity": "Microsoft.Web.Blazor.Standalone.CSharp",
|
||||
"name": "Blazor (standalone)",
|
||||
"name": "Blazor (client-side)",
|
||||
"preferNameDirectory": true,
|
||||
"primaryOutputs": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/vs-2017.3.host",
|
||||
"name": {
|
||||
"text": "Blazor",
|
||||
"text": "Blazor (client-side)",
|
||||
"package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
|
||||
"id": "1050"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@
|
|||
<body>
|
||||
<app>Loading...</app>
|
||||
|
||||
<script src="_framework/components.webassembly.js"></script>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@
|
|||
<body>
|
||||
<app>Loading...</app>
|
||||
<script src="customJsFileForTests.js"></script>
|
||||
<script src="_framework/components.webassembly.js"></script>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@
|
|||
</script>
|
||||
|
||||
<app>Loading...</app>
|
||||
<script src="_framework/components.webassembly.js"></script>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@
|
|||
<body>
|
||||
<app>Loading...</app>
|
||||
|
||||
<script src="_framework/components.webassembly.js"></script>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
<ItemGroup>
|
||||
<WebpackInputs Include="**\*.ts" Exclude="node_modules\**" />
|
||||
<WebPackOutputs Include="src\dist\components.webassembly.js" />
|
||||
<WebPackOutputs Include="src\dist\components.server.js" />
|
||||
<WebPackOutputs Include="src\dist\blazor.webassembly.js" />
|
||||
<WebPackOutputs Include="src\dist\blazor.server.js" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ module.exports = (env, args) => ({
|
|||
rules: [{ test: /\.ts?$/, loader: 'ts-loader' }]
|
||||
},
|
||||
entry: {
|
||||
'components.webassembly': './Boot.WebAssembly.ts',
|
||||
'components.server': './Boot.Server.ts',
|
||||
'blazor.webassembly': './Boot.WebAssembly.ts',
|
||||
'blazor.server': './Boot.Server.ts',
|
||||
},
|
||||
output: { path: path.join(__dirname, '/dist'), filename: '[name].js' }
|
||||
});
|
||||
|
|
|
|||
|
|
@ -311,6 +311,10 @@ namespace Microsoft.AspNetCore.Components
|
|||
void Configure(Microsoft.AspNetCore.Components.RenderHandle renderHandle);
|
||||
System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterCollection parameters);
|
||||
}
|
||||
public partial interface IComponentContext
|
||||
{
|
||||
bool IsConnected { get; }
|
||||
}
|
||||
public partial interface IHandleAfterRender
|
||||
{
|
||||
System.Threading.Tasks.Task OnAfterRenderAsync();
|
||||
|
|
@ -324,6 +328,16 @@ namespace Microsoft.AspNetCore.Components
|
|||
{
|
||||
public InjectAttribute() { }
|
||||
}
|
||||
public partial interface IUriHelper
|
||||
{
|
||||
event System.EventHandler<string> OnLocationChanged;
|
||||
string GetAbsoluteUri();
|
||||
string GetBaseUri();
|
||||
void NavigateTo(string uri);
|
||||
void NavigateTo(string uri, bool forceLoad);
|
||||
System.Uri ToAbsoluteUri(string href);
|
||||
string ToBaseRelativePath(string baseUri, string locationAbsolute);
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public readonly partial struct MarkupString
|
||||
{
|
||||
|
|
@ -545,6 +559,23 @@ namespace Microsoft.AspNetCore.Components
|
|||
public double DeltaY { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public double DeltaZ { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
}
|
||||
public abstract partial class UriHelperBase : Microsoft.AspNetCore.Components.IUriHelper
|
||||
{
|
||||
protected UriHelperBase() { }
|
||||
public event System.EventHandler<string> OnLocationChanged { add { } remove { } }
|
||||
protected virtual void EnsureInitialized() { }
|
||||
public string GetAbsoluteUri() { throw null; }
|
||||
public virtual string GetBaseUri() { throw null; }
|
||||
public virtual void InitializeState(string uriAbsolute, string baseUriAbsolute) { }
|
||||
public void NavigateTo(string uri) { }
|
||||
public void NavigateTo(string uri, bool forceLoad) { }
|
||||
protected abstract void NavigateToCore(string uri, bool forceLoad);
|
||||
protected void SetAbsoluteBaseUri(string baseUri) { }
|
||||
protected void SetAbsoluteUri(string uri) { }
|
||||
public System.Uri ToAbsoluteUri(string href) { throw null; }
|
||||
public string ToBaseRelativePath(string baseUri, string locationAbsolute) { throw null; }
|
||||
protected void TriggerOnLocationChanged() { }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.AspNetCore.Components.Forms
|
||||
{
|
||||
|
|
@ -780,37 +811,3 @@ namespace Microsoft.AspNetCore.Components.Routing
|
|||
Prefix = 0,
|
||||
}
|
||||
}
|
||||
namespace Microsoft.AspNetCore.Components.Services
|
||||
{
|
||||
public partial interface IComponentContext
|
||||
{
|
||||
bool IsConnected { get; }
|
||||
}
|
||||
public partial interface IUriHelper
|
||||
{
|
||||
event System.EventHandler<string> OnLocationChanged;
|
||||
string GetAbsoluteUri();
|
||||
string GetBaseUri();
|
||||
void NavigateTo(string uri);
|
||||
void NavigateTo(string uri, bool forceLoad);
|
||||
System.Uri ToAbsoluteUri(string href);
|
||||
string ToBaseRelativePath(string baseUri, string locationAbsolute);
|
||||
}
|
||||
public abstract partial class UriHelperBase : Microsoft.AspNetCore.Components.Services.IUriHelper
|
||||
{
|
||||
protected UriHelperBase() { }
|
||||
public event System.EventHandler<string> OnLocationChanged { add { } remove { } }
|
||||
protected virtual void EnsureInitialized() { }
|
||||
public string GetAbsoluteUri() { throw null; }
|
||||
public virtual string GetBaseUri() { throw null; }
|
||||
public virtual void InitializeState(string uriAbsolute, string baseUriAbsolute) { }
|
||||
public void NavigateTo(string uri) { }
|
||||
public void NavigateTo(string uri, bool forceLoad) { }
|
||||
protected abstract void NavigateToCore(string uri, bool forceLoad);
|
||||
protected void SetAbsoluteBaseUri(string baseUri) { }
|
||||
protected void SetAbsoluteUri(string uri) { }
|
||||
public System.Uri ToAbsoluteUri(string href) { throw null; }
|
||||
public string ToBaseRelativePath(string baseUri, string locationAbsolute) { throw null; }
|
||||
protected void TriggerOnLocationChanged() { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.Components.Services
|
||||
namespace Microsoft.AspNetCore.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides information about the environment in which components are executing.
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNetCore.Components.Services
|
||||
namespace Microsoft.AspNetCore.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Helpers for working with URIs and navigation state.
|
||||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.RenderTree;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ using System.Reflection;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components.Layouts;
|
||||
using Microsoft.AspNetCore.Components.RenderTree;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
|
||||
namespace Microsoft.AspNetCore.Components.Routing
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNetCore.Components.Services
|
||||
namespace Microsoft.AspNetCore.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// A base class for <see cref="IUriHelper"/> implementations.
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<!-- This file is automatically generated. -->
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||
<Compile Include="Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs" />
|
||||
<Reference Include="Microsoft.AspNetCore.Components.Browser" />
|
||||
<Reference Include="Microsoft.Extensions.Logging" />
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR" />
|
||||
<Reference Include="Microsoft.AspNetCore.StaticFiles" />
|
||||
<Reference Include="Microsoft.Extensions.Caching.Memory" />
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Composite" />
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Embedded" />
|
||||
<Reference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,296 @@
|
|||
// 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 MessagePack
|
||||
{
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public partial struct ExtensionHeader
|
||||
{
|
||||
private int _dummyPrimitive;
|
||||
public ExtensionHeader(sbyte typeCode, int length) { throw null; }
|
||||
public ExtensionHeader(sbyte typeCode, uint length) { throw null; }
|
||||
public uint Length { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public sbyte TypeCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public partial struct ExtensionResult
|
||||
{
|
||||
private object _dummy;
|
||||
private int _dummyPrimitive;
|
||||
public ExtensionResult(sbyte typeCode, System.Buffers.ReadOnlySequence<byte> data) { throw null; }
|
||||
public ExtensionResult(sbyte typeCode, System.Memory<byte> data) { throw null; }
|
||||
public System.Buffers.ReadOnlySequence<byte> Data { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public MessagePack.ExtensionHeader Header { get { throw null; } }
|
||||
public sbyte TypeCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
}
|
||||
public static partial class MessagePackCode
|
||||
{
|
||||
public const byte Array16 = (byte)220;
|
||||
public const byte Array32 = (byte)221;
|
||||
public const byte Bin16 = (byte)197;
|
||||
public const byte Bin32 = (byte)198;
|
||||
public const byte Bin8 = (byte)196;
|
||||
public const byte Ext16 = (byte)200;
|
||||
public const byte Ext32 = (byte)201;
|
||||
public const byte Ext8 = (byte)199;
|
||||
public const byte False = (byte)194;
|
||||
public const byte FixExt1 = (byte)212;
|
||||
public const byte FixExt16 = (byte)216;
|
||||
public const byte FixExt2 = (byte)213;
|
||||
public const byte FixExt4 = (byte)214;
|
||||
public const byte FixExt8 = (byte)215;
|
||||
public const byte Float32 = (byte)202;
|
||||
public const byte Float64 = (byte)203;
|
||||
public const byte Int16 = (byte)209;
|
||||
public const byte Int32 = (byte)210;
|
||||
public const byte Int64 = (byte)211;
|
||||
public const byte Int8 = (byte)208;
|
||||
public const byte Map16 = (byte)222;
|
||||
public const byte Map32 = (byte)223;
|
||||
public const byte MaxFixArray = (byte)159;
|
||||
public const byte MaxFixInt = (byte)127;
|
||||
public const byte MaxFixMap = (byte)143;
|
||||
public const byte MaxFixStr = (byte)191;
|
||||
public const byte MaxNegativeFixInt = (byte)255;
|
||||
public const byte MinFixArray = (byte)144;
|
||||
public const byte MinFixInt = (byte)0;
|
||||
public const byte MinFixMap = (byte)128;
|
||||
public const byte MinFixStr = (byte)160;
|
||||
public const byte MinNegativeFixInt = (byte)224;
|
||||
public const byte NeverUsed = (byte)193;
|
||||
public const byte Nil = (byte)192;
|
||||
public const byte Str16 = (byte)218;
|
||||
public const byte Str32 = (byte)219;
|
||||
public const byte Str8 = (byte)217;
|
||||
public const byte True = (byte)195;
|
||||
public const byte UInt16 = (byte)205;
|
||||
public const byte UInt32 = (byte)206;
|
||||
public const byte UInt64 = (byte)207;
|
||||
public const byte UInt8 = (byte)204;
|
||||
public static bool IsSignedInteger(byte code) { throw null; }
|
||||
public static string ToFormatName(byte code) { throw null; }
|
||||
public static MessagePack.MessagePackType ToMessagePackType(byte code) { throw null; }
|
||||
}
|
||||
public static partial class MessagePackRange
|
||||
{
|
||||
public const int MaxFixArrayCount = 15;
|
||||
public const int MaxFixMapCount = 15;
|
||||
public const int MaxFixNegativeInt = -1;
|
||||
public const int MaxFixPositiveInt = 127;
|
||||
public const int MaxFixStringLength = 31;
|
||||
public const int MinFixNegativeInt = -32;
|
||||
public const int MinFixStringLength = 0;
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public ref partial struct MessagePackReader
|
||||
{
|
||||
private object _dummy;
|
||||
public MessagePackReader(System.Buffers.ReadOnlySequence<byte> readOnlySequence) { throw null; }
|
||||
public MessagePackReader(System.ReadOnlyMemory<byte> memory) { throw null; }
|
||||
public long Consumed { get { throw null; } }
|
||||
public bool End { get { throw null; } }
|
||||
public bool IsNil { get { throw null; } }
|
||||
public byte NextCode { get { throw null; } }
|
||||
public MessagePack.MessagePackType NextMessagePackType { get { throw null; } }
|
||||
public System.SequencePosition Position { get { throw null; } }
|
||||
public System.Buffers.ReadOnlySequence<byte> Sequence { get { throw null; } }
|
||||
public MessagePack.MessagePackReader Clone(System.Buffers.ReadOnlySequence<byte> readOnlySequence) { throw null; }
|
||||
public MessagePack.MessagePackReader CreatePeekReader() { throw null; }
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public int ReadArrayHeader() { throw null; }
|
||||
public bool ReadBoolean() { throw null; }
|
||||
public byte ReadByte() { throw null; }
|
||||
public System.Buffers.ReadOnlySequence<byte> ReadBytes() { throw null; }
|
||||
public char ReadChar() { throw null; }
|
||||
public System.DateTime ReadDateTime() { throw null; }
|
||||
public double ReadDouble() { throw null; }
|
||||
public MessagePack.ExtensionResult ReadExtensionFormat() { throw null; }
|
||||
public MessagePack.ExtensionHeader ReadExtensionFormatHeader() { throw null; }
|
||||
public short ReadInt16() { throw null; }
|
||||
public int ReadInt32() { throw null; }
|
||||
public long ReadInt64() { throw null; }
|
||||
public int ReadMapHeader() { throw null; }
|
||||
public MessagePack.Nil ReadNil() { throw null; }
|
||||
public System.Buffers.ReadOnlySequence<byte> ReadRaw(long length) { throw null; }
|
||||
public sbyte ReadSByte() { throw null; }
|
||||
public float ReadSingle() { throw null; }
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public string ReadString() { throw null; }
|
||||
public System.Buffers.ReadOnlySequence<byte> ReadStringSegment() { throw null; }
|
||||
public ushort ReadUInt16() { throw null; }
|
||||
public uint ReadUInt32() { throw null; }
|
||||
public ulong ReadUInt64() { throw null; }
|
||||
public void Skip() { }
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public bool TryReadNil() { throw null; }
|
||||
}
|
||||
public enum MessagePackType : byte
|
||||
{
|
||||
Array = (byte)7,
|
||||
Binary = (byte)6,
|
||||
Boolean = (byte)3,
|
||||
Extension = (byte)9,
|
||||
Float = (byte)4,
|
||||
Integer = (byte)1,
|
||||
Map = (byte)8,
|
||||
Nil = (byte)2,
|
||||
String = (byte)5,
|
||||
Unknown = (byte)0,
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public ref partial struct MessagePackWriter
|
||||
{
|
||||
private object _dummy;
|
||||
private int _dummyPrimitive;
|
||||
public MessagePackWriter(System.Buffers.IBufferWriter<byte> writer) { throw null; }
|
||||
public bool OldSpec { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public MessagePack.MessagePackWriter Clone(System.Buffers.IBufferWriter<byte> writer) { throw null; }
|
||||
public void Flush() { }
|
||||
public void Write(bool value) { }
|
||||
public void Write(System.Buffers.ReadOnlySequence<byte> src) { }
|
||||
public void Write(byte value) { }
|
||||
public void Write(char value) { }
|
||||
public void Write(System.DateTime dateTime) { }
|
||||
public void Write(double value) { }
|
||||
public void Write(short value) { }
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public void Write(int value) { }
|
||||
public void Write(long value) { }
|
||||
public void Write(System.ReadOnlySpan<byte> src) { }
|
||||
public void Write(System.ReadOnlySpan<char> value) { }
|
||||
public void Write(sbyte value) { }
|
||||
public void Write(float value) { }
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public void Write(string value) { }
|
||||
public void Write(ushort value) { }
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public void Write(uint value) { }
|
||||
public void Write(ulong value) { }
|
||||
public void WriteArrayHeader(int count) { }
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public void WriteArrayHeader(uint count) { }
|
||||
public void WriteExtensionFormat(MessagePack.ExtensionResult extensionData) { }
|
||||
public void WriteExtensionFormatHeader(MessagePack.ExtensionHeader extensionHeader) { }
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)][System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public void WriteFixedArrayHeaderUnsafe(uint count) { }
|
||||
public void WriteInt16(short value) { }
|
||||
public void WriteInt32(int value) { }
|
||||
public void WriteInt64(long value) { }
|
||||
public void WriteInt8(sbyte value) { }
|
||||
public void WriteMapHeader(int count) { }
|
||||
public void WriteMapHeader(uint count) { }
|
||||
public void WriteNil() { }
|
||||
public void WriteRaw(System.Buffers.ReadOnlySequence<byte> rawMessagePackBlock) { }
|
||||
public void WriteRaw(System.ReadOnlySpan<byte> rawMessagePackBlock) { }
|
||||
public void WriteString(System.Buffers.ReadOnlySequence<byte> utf8stringBytes) { }
|
||||
public void WriteString(System.ReadOnlySpan<byte> utf8stringBytes) { }
|
||||
public void WriteUInt16(ushort value) { }
|
||||
public void WriteUInt32(uint value) { }
|
||||
public void WriteUInt64(ulong value) { }
|
||||
public void WriteUInt8(byte value) { }
|
||||
}
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)]
|
||||
public partial struct Nil : System.IEquatable<MessagePack.Nil>
|
||||
{
|
||||
public static readonly MessagePack.Nil Default;
|
||||
public bool Equals(MessagePack.Nil other) { throw null; }
|
||||
public override bool Equals(object obj) { throw null; }
|
||||
public override int GetHashCode() { throw null; }
|
||||
public override string ToString() { throw null; }
|
||||
}
|
||||
public static partial class ReservedMessagePackExtensionTypeCode
|
||||
{
|
||||
public const sbyte DateTime = (sbyte)-1;
|
||||
}
|
||||
}
|
||||
namespace Microsoft.AspNetCore.Builder
|
||||
{
|
||||
public static partial class ComponentEndpointConventionBuilderExtensions
|
||||
{
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder AddComponent(this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder builder, System.Type componentType, string selector) { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder AddComponent<TComponent>(this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder builder, string selector) { throw null; }
|
||||
}
|
||||
public static partial class ComponentEndpointRouteBuilderExtensions
|
||||
{
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints) { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, System.Type componentType, string selector, string path) { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapBlazorHub<TComponent>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string selector) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
|
||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapBlazorHub<TComponent>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string selector, string path) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.AspNetCore.Components.Browser.Rendering
|
||||
{
|
||||
public partial class RemoteRendererException : System.Exception
|
||||
{
|
||||
public RemoteRendererException(string message) { }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.AspNetCore.Components.Server
|
||||
{
|
||||
public partial class CircuitOptions
|
||||
{
|
||||
public CircuitOptions() { }
|
||||
public System.TimeSpan DisconnectedCircuitRetentionPeriod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public int MaxRetainedDisconnectedCircuits { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
}
|
||||
public sealed partial class ComponentHub : Microsoft.AspNetCore.SignalR.Hub
|
||||
{
|
||||
public ComponentHub(System.IServiceProvider services, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Components.Server.ComponentHub> logger) { }
|
||||
public static Microsoft.AspNetCore.Http.PathString DefaultPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public void BeginInvokeDotNetFromJS(string callId, string assemblyName, string methodIdentifier, long dotNetObjectId, string argsJson) { }
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute]
|
||||
public System.Threading.Tasks.Task<bool> ConnectCircuit(string circuitId) { throw null; }
|
||||
public override System.Threading.Tasks.Task OnDisconnectedAsync(System.Exception exception) { throw null; }
|
||||
public void OnRenderCompleted(long renderId, string errorMessageOrNull) { }
|
||||
public string StartCircuit(string uriAbsolute, string baseUriAbsolute) { throw null; }
|
||||
}
|
||||
public partial class ComponentPrerenderingContext
|
||||
{
|
||||
public ComponentPrerenderingContext() { }
|
||||
public System.Type ComponentType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.AspNetCore.Http.HttpContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.AspNetCore.Components.ParameterCollection Parameters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
}
|
||||
public sealed partial class ComponentPrerenderResult
|
||||
{
|
||||
internal ComponentPrerenderResult() { }
|
||||
public void WriteTo(System.IO.TextWriter writer) { }
|
||||
}
|
||||
public partial interface IComponentPrerenderer
|
||||
{
|
||||
System.Threading.Tasks.Task<Microsoft.AspNetCore.Components.Server.ComponentPrerenderResult> PrerenderComponentAsync(Microsoft.AspNetCore.Components.Server.ComponentPrerenderingContext context);
|
||||
}
|
||||
public static partial class WasmMediaTypeNames
|
||||
{
|
||||
public static partial class Application
|
||||
{
|
||||
public const string Wasm = "application/wasm";
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace Microsoft.AspNetCore.Components.Server.Circuits
|
||||
{
|
||||
public sealed partial class Circuit
|
||||
{
|
||||
internal Circuit() { }
|
||||
public string Id { get { throw null; } }
|
||||
}
|
||||
public abstract partial class CircuitHandler
|
||||
{
|
||||
protected CircuitHandler() { }
|
||||
public virtual int Order { get { throw null; } }
|
||||
public virtual System.Threading.Tasks.Task OnCircuitClosedAsync(Microsoft.AspNetCore.Components.Server.Circuits.Circuit circuit, System.Threading.CancellationToken cancellationToken) { throw null; }
|
||||
public virtual System.Threading.Tasks.Task OnCircuitOpenedAsync(Microsoft.AspNetCore.Components.Server.Circuits.Circuit circuit, System.Threading.CancellationToken cancellationToken) { throw null; }
|
||||
public virtual System.Threading.Tasks.Task OnConnectionDownAsync(Microsoft.AspNetCore.Components.Server.Circuits.Circuit circuit, System.Threading.CancellationToken cancellationToken) { throw null; }
|
||||
public virtual System.Threading.Tasks.Task OnConnectionUpAsync(Microsoft.AspNetCore.Components.Server.Circuits.Circuit circuit, System.Threading.CancellationToken cancellationToken) { throw null; }
|
||||
}
|
||||
public partial class RemoteUriHelper : Microsoft.AspNetCore.Components.UriHelperBase
|
||||
{
|
||||
public RemoteUriHelper(Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Components.Server.Circuits.RemoteUriHelper> logger) { }
|
||||
public bool HasAttachedJSRuntime { get { throw null; } }
|
||||
public override void InitializeState(string uriAbsolute, string baseUriAbsolute) { }
|
||||
protected override void NavigateToCore(string uri, bool forceLoad) { }
|
||||
[Microsoft.JSInterop.JSInvokableAttribute("NotifyLocationChanged")]
|
||||
public static void NotifyLocationChanged(string uriAbsolute) { }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.Extensions.DependencyInjection
|
||||
{
|
||||
public static partial class ComponentServiceCollectionExtensions
|
||||
{
|
||||
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddServerSideBlazor(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { throw null; }
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Server;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
|
||||
|
|
@ -13,12 +14,11 @@ namespace Microsoft.AspNetCore.Builder
|
|||
public static class ComponentEndpointRouteBuilderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Maps the SignalR <see cref="ComponentHub"/> to the path <paramref name="path"/> and associates
|
||||
/// the component <typeparamref name="TComponent"/> to this hub instance as the given DOM <paramref name="selector"/>.
|
||||
/// Maps the SignalR <see cref="ComponentHub"/> to the path <see cref="ComponentHub.DefaultPath"/>.
|
||||
/// </summary>
|
||||
/// <param name="endpoints">The <see cref="IEndpointRouteBuilder"/>.</param>
|
||||
/// <returns>The <see cref="IEndpointConventionBuilder"/>.</returns>
|
||||
public static IEndpointConventionBuilder MapComponentHub(this IEndpointRouteBuilder endpoints)
|
||||
public static IEndpointConventionBuilder MapBlazorHub(this IEndpointRouteBuilder endpoints)
|
||||
{
|
||||
if (endpoints == null)
|
||||
{
|
||||
|
|
@ -29,16 +29,16 @@ namespace Microsoft.AspNetCore.Builder
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Maps the SignalR <see cref="ComponentHub"/> to the path <paramref name="path"/> and associates
|
||||
/// Maps the SignalR <see cref="ComponentHub"/> to the path <see cref="ComponentHub.DefaultPath"/> and associates
|
||||
/// the component <typeparamref name="TComponent"/> to this hub instance as the given DOM <paramref name="selector"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="TComponent">The first <see cref="IComponent"/> associated with this <see cref="ComponentHub"/>.</typeparam>
|
||||
/// <param name="endpoints">The <see cref="IEndpointRouteBuilder"/>.</param>
|
||||
/// <param name="selector">The selector for the <typeparamref name="TComponent"/>.</param>
|
||||
/// <returns>The <see cref="IEndpointConventionBuilder"/>.</returns>
|
||||
public static IEndpointConventionBuilder MapComponentHub<TComponent>(
|
||||
public static IEndpointConventionBuilder MapBlazorHub<TComponent>(
|
||||
this IEndpointRouteBuilder endpoints,
|
||||
string selector)
|
||||
string selector) where TComponent: IComponent
|
||||
{
|
||||
if (endpoints == null)
|
||||
{
|
||||
|
|
@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
throw new ArgumentNullException(nameof(selector));
|
||||
}
|
||||
|
||||
return endpoints.MapComponentHub(typeof(TComponent), selector, ComponentHub.DefaultPath);
|
||||
return endpoints.MapBlazorHub(typeof(TComponent), selector, ComponentHub.DefaultPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -62,10 +62,10 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// <param name="selector">The selector for the <typeparamref name="TComponent"/>.</param>
|
||||
/// <param name="path">The path to map to which the <see cref="ComponentHub"/> will be mapped.</param>
|
||||
/// <returns>The <see cref="IEndpointConventionBuilder"/>.</returns>
|
||||
public static IEndpointConventionBuilder MapComponentHub<TComponent>(
|
||||
public static IEndpointConventionBuilder MapBlazorHub<TComponent>(
|
||||
this IEndpointRouteBuilder endpoints,
|
||||
string selector,
|
||||
string path)
|
||||
string path) where TComponent : IComponent
|
||||
{
|
||||
if (endpoints == null)
|
||||
{
|
||||
|
|
@ -82,7 +82,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
throw new ArgumentNullException(nameof(selector));
|
||||
}
|
||||
|
||||
return endpoints.MapComponentHub(typeof(TComponent), selector, path);
|
||||
return endpoints.MapBlazorHub(typeof(TComponent), selector, path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -94,7 +94,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// <param name="selector">The selector for the <paramref name="componentType"/>.</param>
|
||||
/// <param name="path">The path to map to which the <see cref="ComponentHub"/> will be mapped.</param>
|
||||
/// <returns>The <see cref="IEndpointConventionBuilder"/>.</returns>
|
||||
public static IEndpointConventionBuilder MapComponentHub(
|
||||
public static IEndpointConventionBuilder MapBlazorHub(
|
||||
this IEndpointRouteBuilder endpoints,
|
||||
Type componentType,
|
||||
string selector,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
/// has been established.
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <see cref="OnConnectionUpAsync(Circuit, CancellationToken)(Circuit, CancellationToken)"/> is invoked immediately after the completion of
|
||||
/// <see cref="OnConnectionUpAsync(Circuit, CancellationToken)"/> is invoked immediately after the completion of
|
||||
/// <see cref="OnCircuitOpenedAsync(Circuit, CancellationToken)"/>. In addition, the method is invoked each time a connection is re-established
|
||||
/// with a client after it's been dropped. <see cref="OnConnectionDownAsync(Circuit, CancellationToken)"/> is invoked each time a connection
|
||||
/// is dropped.
|
||||
|
|
@ -24,7 +24,6 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
/// Application users may use this event to save state for a client that can be later rehydrated.
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// <ol>
|
||||
/// </summary>
|
||||
public abstract class CircuitHandler
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Components.Browser;
|
||||
using Microsoft.AspNetCore.Components.Browser.Rendering;
|
||||
using Microsoft.AspNetCore.Components.Rendering;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.JSInterop;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ using System.Text.Encodings.Web;
|
|||
using Microsoft.AspNetCore.Components.Browser;
|
||||
using Microsoft.AspNetCore.Components.Browser.Rendering;
|
||||
using Microsoft.AspNetCore.Components.Rendering;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
@ -105,7 +104,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
{
|
||||
throw new InvalidOperationException(
|
||||
$"{nameof(ComponentHub)} doesn't have an associated endpoint. " +
|
||||
"Use 'app.UseEndpoints(endpoints => endpoints.MapComponentHub<App>(\"app\"))' to register your hub.");
|
||||
"Use 'app.UseEndpoints(endpoints => endpoints.MapBlazorHub<App>(\"app\"))' to register your hub.");
|
||||
}
|
||||
|
||||
var componentsMetadata = endpoint.Metadata.OfType<ComponentDescriptor>().ToList();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
|
||||
namespace Microsoft.AspNetCore.Components.Server.Circuits
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.JSInterop;
|
||||
|
|
@ -18,11 +17,18 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
private IJSRuntime _jsRuntime;
|
||||
private readonly ILogger<RemoteUriHelper> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="RemoteUriHelper"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="logger">The <see cref="ILogger{TCategoryName}"/>.</param>
|
||||
public RemoteUriHelper(ILogger<RemoteUriHelper> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether the circuit has an attached <see cref="IJSRuntime"/>.
|
||||
/// </summary>
|
||||
public bool HasAttachedJSRuntime => _jsRuntime != null;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -30,7 +36,6 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
/// </summary>
|
||||
/// <param name="uriAbsolute">The absolute URI of the current page.</param>
|
||||
/// <param name="baseUriAbsolute">The absolute base URI of the current page.</param>
|
||||
/// <param name="jsRuntime">The <see cref="IJSRuntime"/> to use for interoperability.</param>
|
||||
public override void InitializeState(string uriAbsolute, string baseUriAbsolute)
|
||||
{
|
||||
base.InitializeState(uriAbsolute, baseUriAbsolute);
|
||||
|
|
@ -40,8 +45,6 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
/// <summary>
|
||||
/// Initializes the <see cref="RemoteUriHelper"/>.
|
||||
/// </summary>
|
||||
/// <param name="uriAbsolute">The absolute URI of the current page.</param>
|
||||
/// <param name="baseUriAbsolute">The absolute base URI of the current page.</param>
|
||||
/// <param name="jsRuntime">The <see cref="IJSRuntime"/> to use for interoperability.</param>
|
||||
internal void AttachJsRuntime(IJSRuntime jsRuntime)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components.Server.Circuits;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Server;
|
||||
using Microsoft.AspNetCore.Components.Server.BlazorPack;
|
||||
using Microsoft.AspNetCore.Components.Server.Circuits;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.SignalR.Protocol;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
|
@ -23,7 +23,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
/// </summary>
|
||||
/// <param name="services">The <see cref="IServiceCollection"/>.</param>
|
||||
/// <returns>The <see cref="IServiceCollection"/>.</returns>
|
||||
public static IServiceCollection AddRazorComponents(this IServiceCollection services)
|
||||
public static IServiceCollection AddServerSideBlazor(this IServiceCollection services)
|
||||
{
|
||||
services.AddSignalR()
|
||||
.AddHubOptions<ComponentHub>(options =>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<Description>Runtime server features for ASP.NET Core Components.</Description>
|
||||
<IsShippingPackage>true</IsShippingPackage>
|
||||
<IsAspNetCoreApp>true</IsAspNetCoreApp>
|
||||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||
<HasReferenceAssembly>false</HasReferenceAssembly>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<IsPackable>false</IsPackable>
|
||||
<GenerateEmbeddedFilesManifest>false</GenerateEmbeddedFilesManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="$(ComponentsSharedSourceRoot)\src\CacheHeaderSettings.cs" Link="Shared\CacheHeaderSettings.cs" />
|
||||
</ItemGroup>
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(BuildNodeJS)' != 'false'">
|
||||
<!-- We need .Browser.JS to build first so we can embed its .js output -->
|
||||
<EmbeddedResource Include="..\..\Browser.JS\src\dist\components.server.js" LogicalName="_framework\%(Filename)%(Extension)" />
|
||||
<EmbeddedResource Include="..\..\Browser.JS\src\dist\blazor.server.js" LogicalName="_framework\%(Filename)%(Extension)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="_EnsureBrowserJS" BeforeTargets="CoreCompile" Condition="'$(BuildNodeJS)' != 'false'">
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ using System.IO;
|
|||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components.Server.Circuits;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@page "/prerendered-interop"
|
||||
@using Microsoft.AspNetCore.Components.Services
|
||||
@using Microsoft.AspNetCore.Components
|
||||
@using Microsoft.JSInterop
|
||||
@inject IComponentContext ComponentContext
|
||||
@inject IJSRuntime JSRuntime
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@page "/prerendered-transition"
|
||||
@using Microsoft.AspNetCore.Components.Services
|
||||
@using Microsoft.AspNetCore.Components
|
||||
@inject IComponentContext ComponentContext
|
||||
|
||||
<h1>Hello</h1>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@inject Microsoft.AspNetCore.Components.Services.IUriHelper uriHelper
|
||||
@inject Microsoft.AspNetCore.Components.IUriHelper uriHelper
|
||||
<style type="text/css">a.active { background-color: yellow; font-weight: bold; }</style>
|
||||
<ul>
|
||||
<li><NavLink href="/subdir/" Match=NavLinkMatch.All>Default (matches all)</NavLink></li>
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@
|
|||
}
|
||||
|
||||
(function () {
|
||||
// Load either components.webassembly.js or components.server.js depending
|
||||
// Load either blazor.webassembly.js or blazor.server.js depending
|
||||
// on the hash part of the URL. This is just to give a way for the
|
||||
// test runner to make the selection.
|
||||
var src = location.hash === '#server'
|
||||
? 'components.server.js'
|
||||
: 'components.webassembly.js';
|
||||
? 'blazor.server.js'
|
||||
: 'blazor.webassembly.js';
|
||||
document.write('<script src="_framework/' + src + '"><' + '/script>');
|
||||
})();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<app>@(await Html.RenderComponentAsync<App>(new { Name="Guest" }))</app>
|
||||
|
||||
<script src="_framework/components.server.js" autostart="false"></script>
|
||||
<script src="_framework/blazor.server.js" autostart="false"></script>
|
||||
<script>
|
||||
Blazor.start({
|
||||
configureSignalR: function (builder) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace ComponentsApp.Server
|
|||
{
|
||||
services.AddMvc();
|
||||
services.AddSingleton<CircuitHandler, LoggingCircuitHandler>();
|
||||
services.AddRazorComponents();
|
||||
services.AddServerSideBlazor();
|
||||
|
||||
services.AddSingleton<WeatherForecastService, DefaultWeatherForecastService>();
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ namespace ComponentsApp.Server
|
|||
{
|
||||
endpoints.MapRazorPages();
|
||||
endpoints.MapControllers();
|
||||
endpoints.MapComponentHub();
|
||||
endpoints.MapBlazorHub();
|
||||
endpoints.MapFallbackToPage("/Index");
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<button id="load-boot-script" onclick="start()">Load boot script</button>
|
||||
|
||||
<script src="_framework/components.server.js" autostart="false"></script>
|
||||
<script src="_framework/blazor.server.js" autostart="false"></script>
|
||||
<script>
|
||||
// Used by InteropOnInitializationComponent
|
||||
function setElementValue(element, newValue) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace TestServer
|
|||
{
|
||||
options.AddPolicy("AllowAll", _ => { /* Controlled below */ });
|
||||
});
|
||||
services.AddRazorComponents();
|
||||
services.AddServerSideBlazor();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
|
@ -52,7 +52,6 @@ namespace TestServer
|
|||
// we're not relying on any extra magic inside MapComponentsHub, since it's
|
||||
// important that people can set up these bits of middleware manually (e.g., to
|
||||
// swap in UseAzureSignalR instead of UseSignalR).
|
||||
|
||||
subdirApp.UseRouting();
|
||||
|
||||
subdirApp.UseEndpoints(endpoints =>
|
||||
|
|
@ -79,7 +78,7 @@ namespace TestServer
|
|||
subdirApp.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapFallbackToPage("/PrerenderedHost");
|
||||
endpoints.MapComponentHub();
|
||||
endpoints.MapBlazorHub();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace Microsoft.AspNetCore.Mvc.Rendering
|
|||
if (prerenderer == null)
|
||||
{
|
||||
throw new InvalidOperationException($"No '{typeof(IComponentPrerenderer).Name}' implementation has been registered in the dependency injection container. " +
|
||||
$"This typically means a call to 'services.AddRazorComponents()' is missing in 'Startup.ConfigureServices'.");
|
||||
$"This typically means a call to 'services.AddServerSideBlazor()' is missing in 'Startup.ConfigureServices'.");
|
||||
}
|
||||
|
||||
var parametersCollection = parameters == null ?
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;aspnetcoremvc</PackageTags>
|
||||
<IsAspNetCoreApp>false</IsAspNetCoreApp>
|
||||
<IsShippingPackage>true</IsShippingPackage>
|
||||
<IsAspNetCoreApp>true</IsAspNetCoreApp>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ using System.Text.RegularExpressions;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.RenderTree;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Html;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
|
@ -29,7 +28,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
|
|||
var helper = CreateHelper(null, s => { });
|
||||
var writer = new StringWriter();
|
||||
var expectedmessage = $"No 'IComponentPrerenderer' implementation has been registered in the dependency injection container. " +
|
||||
$"This typically means a call to 'services.AddRazorComponents()' is missing in 'Startup.ConfigureServices'.";
|
||||
$"This typically means a call to 'services.AddServerSideBlazor()' is missing in 'Startup.ConfigureServices'.";
|
||||
|
||||
// Act & Assert
|
||||
var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => helper.RenderComponentAsync<TestComponent>());
|
||||
|
|
@ -434,7 +433,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
|
|||
var services = new ServiceCollection();
|
||||
services.AddLogging();
|
||||
services.AddSingleton(HtmlEncoder.Default);
|
||||
configureServices = configureServices ?? (s => s.AddRazorComponents());
|
||||
configureServices = configureServices ?? (s => s.AddServerSideBlazor());
|
||||
configureServices?.Invoke(services);
|
||||
|
||||
var helper = new Mock<IHtmlHelper>();
|
||||
|
|
|
|||
|
|
@ -380,6 +380,12 @@ namespace Microsoft.AspNetCore.Mvc.Rendering
|
|||
public static System.Threading.Tasks.Task RenderPartialAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData) { throw null; }
|
||||
public static System.Threading.Tasks.Task RenderPartialAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, object model) { throw null; }
|
||||
}
|
||||
public static partial class HtmlHelperRazorComponentExtensions
|
||||
{
|
||||
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> RenderStaticComponentAsync<TComponent>(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute]
|
||||
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> RenderStaticComponentAsync<TComponent>(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object parameters) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
|
||||
}
|
||||
public static partial class HtmlHelperSelectExtensions
|
||||
{
|
||||
public static Microsoft.AspNetCore.Html.IHtmlContent DropDownList(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) { throw null; }
|
||||
|
|
@ -977,12 +983,6 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
|
|||
public string ValidationMessageElement { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public string ValidationSummaryMessageElement { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
}
|
||||
public static partial class HtmlHelperRazorComponentExtensions
|
||||
{
|
||||
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> RenderStaticComponentAsync<TComponent>(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute]
|
||||
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> RenderStaticComponentAsync<TComponent>(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object parameters) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
|
||||
}
|
||||
public partial class HtmlHelper<TModel> : Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper, Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>
|
||||
{
|
||||
public HtmlHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator htmlGenerator, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope bufferScope, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, System.Text.Encodings.Web.UrlEncoder urlEncoder, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpressionProvider modelExpressionProvider) : base (default(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator), default(Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine), default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider), default(Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope), default(System.Text.Encodings.Web.HtmlEncoder), default(System.Text.Encodings.Web.UrlEncoder)) { }
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@
|
|||
using System;
|
||||
using System.Buffers;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.ApplicationModels;
|
||||
using Microsoft.AspNetCore.Mvc.ApplicationParts;
|
||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||
using Microsoft.AspNetCore.Mvc.Formatters;
|
||||
using Microsoft.AspNetCore.Mvc.Infrastructure;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewComponents;
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ using System;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Html;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures.RazorComponents;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
namespace Microsoft.AspNetCore.Mvc.Rendering
|
||||
{
|
||||
/// <summary>
|
||||
/// Extensions for rendering components.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Extensions;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ using System.Text.Encodings.Web;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Rendering;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Extensions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using System.Text.Encodings.Web;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.RenderTree;
|
||||
using Microsoft.AspNetCore.Components.Services;
|
||||
using Microsoft.AspNetCore.Components.Server;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures.RazorComponents;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace MvcSandbox
|
|||
{
|
||||
options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer);
|
||||
});
|
||||
services.AddRazorComponents();
|
||||
services.AddServerSideBlazor();
|
||||
services.AddMvc()
|
||||
.AddRazorRuntimeCompilation()
|
||||
.SetCompatibilityVersion(Microsoft.AspNetCore.Mvc.CompatibilityVersion.Latest);
|
||||
|
|
@ -71,7 +71,7 @@ namespace MvcSandbox
|
|||
|
||||
builder.MapControllers();
|
||||
builder.MapRazorPages();
|
||||
builder.MapComponentHub<MvcSandbox.Components.App>("app");
|
||||
builder.MapBlazorHub<MvcSandbox.Components.App>("app");
|
||||
builder.MapFallbackToPage("/Components");
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
|
|||
{
|
||||
// Arrange & Act
|
||||
var client = CreateClient(Factory
|
||||
.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddRazorComponents())));
|
||||
.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddServerSideBlazor())));
|
||||
|
||||
var response = await client.GetAsync("http://localhost/components");
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
|
|||
public async Task Renders_RoutingComponent()
|
||||
{
|
||||
// Arrange & Act
|
||||
var client = CreateClient(Factory.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddRazorComponents())));
|
||||
var client = CreateClient(Factory.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddServerSideBlazor())));
|
||||
|
||||
var response = await client.GetAsync("http://localhost/components/routable");
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
|
|||
{
|
||||
// Arrange & Act
|
||||
var client = CreateClient(Factory
|
||||
.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddRazorComponents())));
|
||||
.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddServerSideBlazor())));
|
||||
|
||||
var response = await client.GetAsync("http://localhost/components/routable");
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
|
|||
{
|
||||
// Arrange & Act
|
||||
var client = CreateClient(Factory
|
||||
.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddRazorComponents())));
|
||||
.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddServerSideBlazor())));
|
||||
|
||||
var response = await client.GetAsync("http://localhost/components/false");
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
|
|||
{
|
||||
// Arrange & Act
|
||||
var client = CreateClient(Factory
|
||||
.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddRazorComponents())));
|
||||
.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddServerSideBlazor())));
|
||||
|
||||
var response = await client.GetAsync("http://localhost/components/routable/false");
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
|
|||
public async Task Renders_ThrowingComponent_UsingRazorComponents_Prerenderer()
|
||||
{
|
||||
// Arrange & Act
|
||||
var client = CreateClient(Factory.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddRazorComponents())));
|
||||
var client = CreateClient(Factory.WithWebHostBuilder(builder => builder.ConfigureServices(services => services.AddServerSideBlazor())));
|
||||
|
||||
var response = await client.GetAsync("http://localhost/components/throws");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
|
|
@ -30,8 +30,6 @@
|
|||
<PackageVersionVariableReference Include="$(RepositoryRoot)src\Azure\AzureAD\Authentication.AzureAD.UI\src\Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj" />
|
||||
<PackageVersionVariableReference Include="$(RepositoryRoot)src\Azure\AzureAD\Authentication.AzureADB2C.UI\src\Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj" />
|
||||
<PackageVersionVariableReference Include="$(RepositoryRoot)src\Components\Components\src\Microsoft.AspNetCore.Components.csproj" />
|
||||
<PackageVersionVariableReference Include="$(RepositoryRoot)src\Components\Browser\src\Microsoft.AspNetCore.Components.Browser.csproj" />
|
||||
<PackageVersionVariableReference Include="$(RepositoryRoot)src\Mvc\Mvc.Components.Prerendering\src\Microsoft.AspNetCore.Mvc.Components.Prerendering.csproj" />
|
||||
<PackageVersionVariableReference Include="$(RepositoryRoot)src\Identity\EntityFrameworkCore\src\Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj" />
|
||||
<PackageVersionVariableReference Include="$(RepositoryRoot)src\Identity\UI\src\Microsoft.AspNetCore.Identity.UI.csproj" />
|
||||
<PackageVersionVariableReference Include="$(RepositoryRoot)src\Middleware\Diagnostics.EntityFrameworkCore\src\Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj" />
|
||||
|
|
|
|||
|
|
@ -8,8 +8,5 @@
|
|||
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Components.Prerendering" Version="${MicrosoftAspNetCoreMvcComponentsPrerenderingPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
],
|
||||
"name": "ASP.NET Core Web App (Razor Components)",
|
||||
"generatorVersions": "[1.0.0.0-*)",
|
||||
"description": "A project template for creating an ASP.NET Core application with Razor Components. This template can be used for web applications with rich dynamic user interfaces (UIs).",
|
||||
"description": "A project template for creating a Blazor application that runs server-side inside an ASP.NET Core application. This template can be used for web applications with rich dynamic user interfaces (UIs).",
|
||||
"groupIdentity": "Microsoft.Web.RazorComponents",
|
||||
"precedence": "5000",
|
||||
"identity": "Microsoft.Web.RazorComponents.CSharp.3.0",
|
||||
"shortName": "razorcomponents",
|
||||
"shortName": "blazorserverside",
|
||||
"tags": {
|
||||
"language": "C#",
|
||||
"type": "project"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"id": "1030"
|
||||
},
|
||||
"order": 304,
|
||||
"icon": "vs-2017.3/RazorComponents.png",
|
||||
"icon": "vs-2017.3/icon.png",
|
||||
"learnMoreLink": "https://go.microsoft.com/fwlink/?LinkID=784883",
|
||||
"uiFilters": [
|
||||
"oneaspnet"
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 741 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
|
|
@ -24,6 +24,6 @@
|
|||
<body>
|
||||
<app>@(await Html.RenderComponentAsync<App>())</app>
|
||||
|
||||
<script src="_framework/components.server.js"></script>
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace RazorComponentsWeb_CSharp
|
|||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddRazorPages();
|
||||
services.AddRazorComponents();
|
||||
services.AddServerSideBlazor();
|
||||
services.AddSingleton<WeatherForecastService>();
|
||||
}
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ namespace RazorComponentsWeb_CSharp
|
|||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapComponentHub();
|
||||
endpoints.MapBlazorHub();
|
||||
endpoints.MapFallbackToPage("/_Host");
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ namespace Templates.Test
|
|||
[Fact]
|
||||
public async Task RazorComponentsTemplateWorks()
|
||||
{
|
||||
Project = await ProjectFactory.GetOrCreateProject("razorcomponents", Output);
|
||||
Project = await ProjectFactory.GetOrCreateProject("blazorserverside", Output);
|
||||
|
||||
var createResult = await Project.RunDotNetNewAsync("razorcomponents");
|
||||
var createResult = await Project.RunDotNetNewAsync("blazorserverside");
|
||||
Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult));
|
||||
|
||||
var publishResult = await Project.RunDotNetPublishAsync();
|
||||
|
|
|
|||
Loading…
Reference in New Issue