Skip to content

Commit 9e365f4

Browse files
CR: Make DefaultComponentActivator internal
1 parent 53588b4 commit 9e365f4

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,6 @@ protected virtual void OnParametersSet() { }
107107
protected virtual bool ShouldRender() { throw null; }
108108
protected void StateHasChanged() { }
109109
}
110-
public partial class DefaultComponentActivator : Microsoft.AspNetCore.Components.IComponentActivator
111-
{
112-
public DefaultComponentActivator() { }
113-
public Microsoft.AspNetCore.Components.IComponent CreateInstance(System.Type componentType) { throw null; }
114-
}
115110
public abstract partial class Dispatcher
116111
{
117112
protected Dispatcher() { }

src/Components/Components/src/DefaultComponentActivator.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@
55

66
namespace Microsoft.AspNetCore.Components
77
{
8-
/// <summary>
9-
/// Default implementation of <see cref="IComponentActivator"/>.
10-
/// </summary>
11-
public class DefaultComponentActivator : IComponentActivator
8+
internal class DefaultComponentActivator : IComponentActivator
129
{
13-
// If no IComponentActivator is supplied by DI, the renderer uses this instance.
14-
// It's internal because in the future, we might want to add per-scope state and then
15-
// it would no longer be applicable to have a shared instance.
16-
internal static IComponentActivator Instance { get; } = new DefaultComponentActivator();
10+
public static IComponentActivator Instance { get; } = new DefaultComponentActivator();
1711

1812
/// <inheritdoc />
1913
public IComponent CreateInstance(Type componentType)

0 commit comments

Comments
 (0)