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 virtual bool ShouldRender() { throw null; }
protected void StateHasChanged() { } 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 public abstract partial class Dispatcher
{ {
protected Dispatcher() { } protected Dispatcher() { }

View File

@ -5,15 +5,9 @@ using System;
namespace Microsoft.AspNetCore.Components namespace Microsoft.AspNetCore.Components
{ {
/// <summary> internal class DefaultComponentActivator : IComponentActivator
/// Default implementation of <see cref="IComponentActivator"/>.
/// </summary>
public class DefaultComponentActivator : IComponentActivator
{ {
// If no IComponentActivator is supplied by DI, the renderer uses this instance. public static IComponentActivator Instance { get; } = new DefaultComponentActivator();
// 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();
/// <inheritdoc /> /// <inheritdoc />
public IComponent CreateInstance(Type componentType) public IComponent CreateInstance(Type componentType)