CR: Make DefaultComponentActivator internal

This commit is contained in:
Steve Sanderson 2020-07-03 11:46:34 +01:00
parent 53588b45dc
commit 9e365f4356
2 changed files with 2 additions and 13 deletions

View File

@ -107,11 +107,6 @@ namespace Microsoft.AspNetCore.Components
protected virtual bool ShouldRender() { throw null; }
protected void StateHasChanged() { }
}
public partial class DefaultComponentActivator : Microsoft.AspNetCore.Components.IComponentActivator
{
public DefaultComponentActivator() { }
public Microsoft.AspNetCore.Components.IComponent CreateInstance(System.Type componentType) { throw null; }
}
public abstract partial class Dispatcher
{
protected Dispatcher() { }

View File

@ -5,15 +5,9 @@ using System;
namespace Microsoft.AspNetCore.Components
{
/// <summary>
/// Default implementation of <see cref="IComponentActivator"/>.
/// </summary>
public class DefaultComponentActivator : IComponentActivator
internal class DefaultComponentActivator : IComponentActivator
{
// If no IComponentActivator is supplied by DI, the renderer uses this instance.
// It's internal because in the future, we might want to add per-scope state and then
// it would no longer be applicable to have a shared instance.
internal static IComponentActivator Instance { get; } = new DefaultComponentActivator();
public static IComponentActivator Instance { get; } = new DefaultComponentActivator();
/// <inheritdoc />
public IComponent CreateInstance(Type componentType)