Rename IBlazorApplicationBuilder->IComponentsApplicationBuilder
This commit is contained in:
parent
921c6c16d6
commit
c901cc069d
|
|
@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Components.Builder;
|
|||
|
||||
namespace Microsoft.AspNetCore.Blazor.Hosting
|
||||
{
|
||||
internal class WebAssemblyBlazorApplicationBuilder : IBlazorApplicationBuilder
|
||||
internal class WebAssemblyBlazorApplicationBuilder : IComponentsApplicationBuilder
|
||||
{
|
||||
public WebAssemblyBlazorApplicationBuilder(IServiceProvider services)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ namespace Microsoft.AspNetCore.Components.Hosting
|
|||
{
|
||||
public List<object> Arguments { get; } = new List<object>();
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app, string foo)
|
||||
public void Configure(IComponentsApplicationBuilder app, string foo)
|
||||
{
|
||||
Arguments.Add(app);
|
||||
Arguments.Add(foo);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Blazor.Hosting.Test
|
|||
// Arrange
|
||||
var builder = new WebAssemblyHostBuilder();
|
||||
var host = builder.Build();
|
||||
|
||||
|
||||
// Act
|
||||
var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await host.StartAsync());
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ namespace Microsoft.AspNetCore.Blazor.Hosting.Test
|
|||
{
|
||||
public bool ConfigureCalled { get; set; }
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app, IServiceProvider services)
|
||||
public void Configure(IComponentsApplicationBuilder app, IServiceProvider services)
|
||||
{
|
||||
ConfigureCalled = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace BlazorHosted_CSharp.Client
|
|||
{
|
||||
}
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app)
|
||||
public void Configure(IComponentsApplicationBuilder app)
|
||||
{
|
||||
app.AddComponent<App>("app");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace BlazorStandalone_CSharp
|
|||
{
|
||||
}
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app)
|
||||
public void Configure(IComponentsApplicationBuilder app)
|
||||
{
|
||||
app.AddComponent<App>("app");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace HostedInAspNet.Client
|
|||
{
|
||||
}
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app)
|
||||
public void Configure(IComponentsApplicationBuilder app)
|
||||
{
|
||||
app.AddComponent<Home>("app");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Blazor.E2EPerformance
|
|||
{
|
||||
}
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app)
|
||||
public void Configure(IComponentsApplicationBuilder app)
|
||||
{
|
||||
app.AddComponent<App>("app");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace StandaloneApp
|
|||
{
|
||||
}
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app)
|
||||
public void Configure(IComponentsApplicationBuilder app)
|
||||
{
|
||||
app.AddComponent<App>("app");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@
|
|||
namespace Microsoft.AspNetCore.Components.Builder
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides extension methods for <see cref="IBlazorApplicationBuilder"/>.
|
||||
/// Provides extension methods for <see cref="IComponentsApplicationBuilder"/>.
|
||||
/// </summary>
|
||||
public static class BlazorApplicationBuilderExtensions
|
||||
public static class ComponentsApplicationBuilderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Associates the component type with the application,
|
||||
/// causing it to be displayed in the specified DOM element.
|
||||
/// </summary>
|
||||
/// <param name="app">The <see cref="IBlazorApplicationBuilder"/>.</param>
|
||||
/// <param name="app">The <see cref="IComponentsApplicationBuilder"/>.</param>
|
||||
/// <typeparam name="TComponent">The type of the component.</typeparam>
|
||||
/// <param name="domElementSelector">A CSS selector that uniquely identifies a DOM element.</param>
|
||||
public static void AddComponent<TComponent>(this IBlazorApplicationBuilder app, string domElementSelector)
|
||||
public static void AddComponent<TComponent>(this IComponentsApplicationBuilder app, string domElementSelector)
|
||||
where TComponent : IComponent
|
||||
{
|
||||
app.AddComponent(typeof(TComponent), domElementSelector);
|
||||
|
|
@ -6,9 +6,9 @@ using System;
|
|||
namespace Microsoft.AspNetCore.Components.Builder
|
||||
{
|
||||
/// <summary>
|
||||
/// A builder for constructing a Blazor application.
|
||||
/// A builder for adding components to an application.
|
||||
/// </summary>
|
||||
public interface IBlazorApplicationBuilder
|
||||
public interface IComponentsApplicationBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the application services.
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
namespace Microsoft.AspNetCore.Builder
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides configuration options to the <see cref="BlazorApplicationBuilderExtensions.UseBlazor(IApplicationBuilder, BlazorOptions)"/>
|
||||
/// Provides configuration options to the <see cref="ComponentsApplicationBuilderExtensions.UseBlazor(IApplicationBuilder, BlazorOptions)"/>
|
||||
/// middleware.
|
||||
/// </summary>
|
||||
public class BlazorOptions
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Components.Builder;
|
|||
|
||||
namespace Microsoft.AspNetCore.Components.Hosting
|
||||
{
|
||||
internal class ServerSideBlazorApplicationBuilder : IBlazorApplicationBuilder
|
||||
internal class ServerSideBlazorApplicationBuilder : IComponentsApplicationBuilder
|
||||
{
|
||||
public ServerSideBlazorApplicationBuilder(IServiceProvider services)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
public event UnhandledExceptionEventHandler UnhandledException;
|
||||
|
||||
private bool _isInitialized;
|
||||
private Action<IBlazorApplicationBuilder> _configure;
|
||||
private Action<IComponentsApplicationBuilder> _configure;
|
||||
|
||||
public CircuitHost(
|
||||
IServiceScope scope,
|
||||
IClientProxy client,
|
||||
RendererRegistry rendererRegistry,
|
||||
RemoteRenderer renderer,
|
||||
Action<IBlazorApplicationBuilder> configure,
|
||||
Action<IComponentsApplicationBuilder> configure,
|
||||
IJSRuntime jsRuntime,
|
||||
CircuitSynchronizationContext synchronizationContext)
|
||||
{
|
||||
|
|
@ -84,7 +84,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
public IServiceScope Scope { get; }
|
||||
|
||||
public IServiceProvider Services { get; }
|
||||
|
||||
|
||||
public CircuitSynchronizationContext SynchronizationContext { get; }
|
||||
|
||||
public async Task InitializeAsync()
|
||||
|
|
@ -116,7 +116,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
await SynchronizationContext.Invoke(() =>
|
||||
{
|
||||
SetCurrentCircuitHost(this);
|
||||
|
||||
|
||||
DotNetDispatcher.BeginInvoke(callId, assemblyName, methodIdentifier, dotNetObjectId, argsJson);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
|
|||
{
|
||||
// During the DI configuration phase, we use Configure<DefaultCircuitFactoryOptions>(...)
|
||||
// callbacks to build up this dictionary mapping paths to startup actions
|
||||
public Dictionary<PathString, Action<IBlazorApplicationBuilder>> StartupActions { get; }
|
||||
public Dictionary<PathString, Action<IComponentsApplicationBuilder>> StartupActions { get; }
|
||||
|
||||
public DefaultCircuitFactoryOptions()
|
||||
{
|
||||
StartupActions = new Dictionary<PathString, Action<IBlazorApplicationBuilder>>();
|
||||
StartupActions = new Dictionary<PathString, Action<IComponentsApplicationBuilder>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Components.Hosting
|
|||
|
||||
public object Instance { get; }
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app, IServiceProvider services)
|
||||
public void Configure(IComponentsApplicationBuilder app, IServiceProvider services)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Components.Hosting
|
|||
for (var i = 0; i < parameters.Length; i++)
|
||||
{
|
||||
var parameter = parameters[i];
|
||||
arguments[i] = parameter.ParameterType == typeof(IBlazorApplicationBuilder)
|
||||
arguments[i] = parameter.ParameterType == typeof(IComponentsApplicationBuilder)
|
||||
? app
|
||||
: services.GetRequiredService(parameter.ParameterType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ namespace Microsoft.AspNetCore.Components.Hosting
|
|||
{
|
||||
void ConfigureServices(IServiceCollection services);
|
||||
|
||||
void Configure(IBlazorApplicationBuilder app, IServiceProvider services);
|
||||
void Configure(IComponentsApplicationBuilder app, IServiceProvider services);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BasicTestApp
|
|||
{
|
||||
}
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app)
|
||||
public void Configure(IComponentsApplicationBuilder app)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY")))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace ComponentsApp.App
|
|||
{
|
||||
}
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app)
|
||||
public void Configure(IComponentsApplicationBuilder app)
|
||||
{
|
||||
app.AddComponent<App>("app");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace RazorComponentsWeb_CSharp.App
|
|||
services.AddSingleton<WeatherForecastService>();
|
||||
}
|
||||
|
||||
public void Configure(IBlazorApplicationBuilder app)
|
||||
public void Configure(IComponentsApplicationBuilder app)
|
||||
{
|
||||
app.AddComponent<App>("app");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue