Skip to content

Commit

Permalink
Rename IBlazorApplicationBuilder->IComponentsApplicationBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSandersonMS authored and mkArtakMSFT committed Jan 18, 2019
1 parent 921c6c1 commit c901cc0
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 29 deletions.
Expand Up @@ -8,7 +8,7 @@

namespace Microsoft.AspNetCore.Blazor.Hosting
{
internal class WebAssemblyBlazorApplicationBuilder : IBlazorApplicationBuilder
internal class WebAssemblyBlazorApplicationBuilder : IComponentsApplicationBuilder
{
public WebAssemblyBlazorApplicationBuilder(IServiceProvider services)
{
Expand Down
Expand Up @@ -200,7 +200,7 @@ private class MyStartup8
{
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);
Expand Down
Expand Up @@ -20,7 +20,7 @@ public async Task BrowserHost_StartAsync_ThrowsWithoutStartup()
// Arrange
var builder = new WebAssemblyHostBuilder();
var host = builder.Build();

// Act
var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await host.StartAsync());

Expand Down Expand Up @@ -69,7 +69,7 @@ private class MockStartup : IBlazorStartup
{
public bool ConfigureCalled { get; set; }

public void Configure(IBlazorApplicationBuilder app, IServiceProvider services)
public void Configure(IComponentsApplicationBuilder app, IServiceProvider services)
{
ConfigureCalled = true;
}
Expand Down
Expand Up @@ -9,7 +9,7 @@ public void ConfigureServices(IServiceCollection services)
{
}

public void Configure(IBlazorApplicationBuilder app)
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
}
Expand Down
Expand Up @@ -9,7 +9,7 @@ public void ConfigureServices(IServiceCollection services)
{
}

public void Configure(IBlazorApplicationBuilder app)
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
}
Expand Down
Expand Up @@ -12,7 +12,7 @@ public void ConfigureServices(IServiceCollection services)
{
}

public void Configure(IBlazorApplicationBuilder app)
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<Home>("app");
}
Expand Down
Expand Up @@ -12,7 +12,7 @@ public void ConfigureServices(IServiceCollection services)
{
}

public void Configure(IBlazorApplicationBuilder app)
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
}
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Blazor/testassets/StandaloneApp/Startup.cs
Expand Up @@ -12,7 +12,7 @@ public void ConfigureServices(IServiceCollection services)
{
}

public void Configure(IBlazorApplicationBuilder app)
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
}
Expand Down
Expand Up @@ -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);
Expand Down
Expand Up @@ -6,9 +6,9 @@
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.
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Server/src/BlazorOptions.cs
Expand Up @@ -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
Expand Down
Expand Up @@ -7,7 +7,7 @@

namespace Microsoft.AspNetCore.Components.Hosting
{
internal class ServerSideBlazorApplicationBuilder : IBlazorApplicationBuilder
internal class ServerSideBlazorApplicationBuilder : IComponentsApplicationBuilder
{
public ServerSideBlazorApplicationBuilder(IServiceProvider services)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Components/Server/src/Circuits/CircuitHost.cs
Expand Up @@ -44,14 +44,14 @@ public static void SetCurrentCircuitHost(CircuitHost circuitHost)
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)
{
Expand Down Expand Up @@ -84,7 +84,7 @@ public static void SetCurrentCircuitHost(CircuitHost circuitHost)
public IServiceScope Scope { get; }

public IServiceProvider Services { get; }

public CircuitSynchronizationContext SynchronizationContext { get; }

public async Task InitializeAsync()
Expand Down Expand Up @@ -116,7 +116,7 @@ public async void BeginInvokeDotNetFromJS(string callId, string assemblyName, st
await SynchronizationContext.Invoke(() =>
{
SetCurrentCircuitHost(this);
DotNetDispatcher.BeginInvoke(callId, assemblyName, methodIdentifier, dotNetObjectId, argsJson);
});
}
Expand Down
Expand Up @@ -12,11 +12,11 @@ internal class DefaultCircuitFactoryOptions
{
// 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>>();
}
}
}
4 changes: 2 additions & 2 deletions src/Components/Shared/src/ConventionBasedStartup.cs
Expand Up @@ -31,7 +31,7 @@ public ConventionBasedStartup(object instance)

public object Instance { get; }

public void Configure(IBlazorApplicationBuilder app, IServiceProvider services)
public void Configure(IComponentsApplicationBuilder app, IServiceProvider services)
{
try
{
Expand All @@ -43,7 +43,7 @@ public void Configure(IBlazorApplicationBuilder app, IServiceProvider services)
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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Shared/src/IBlazorStartup.cs
Expand Up @@ -11,6 +11,6 @@ internal interface IBlazorStartup
{
void ConfigureServices(IServiceCollection services);

void Configure(IBlazorApplicationBuilder app, IServiceProvider services);
void Configure(IComponentsApplicationBuilder app, IServiceProvider services);
}
}
2 changes: 1 addition & 1 deletion src/Components/test/testassets/BasicTestApp/Startup.cs
Expand Up @@ -16,7 +16,7 @@ public void ConfigureServices(IServiceCollection services)
{
}

public void Configure(IBlazorApplicationBuilder app)
public void Configure(IComponentsApplicationBuilder app)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY")))
{
Expand Down
Expand Up @@ -12,7 +12,7 @@ public void ConfigureServices(IServiceCollection services)
{
}

public void Configure(IBlazorApplicationBuilder app)
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
}
Expand Down
Expand Up @@ -12,7 +12,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton<WeatherForecastService>();
}

public void Configure(IBlazorApplicationBuilder app)
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
}
Expand Down

0 comments on commit c901cc0

Please sign in to comment.