2 implementations of IViewComponentActivator
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ViewComponents\DefaultViewComponentActivator.cs (1)
17internal sealed class DefaultViewComponentActivator : IViewComponentActivator
ViewComponents\ServiceBasedViewComponentActivator.cs (1)
12public class ServiceBasedViewComponentActivator : IViewComponentActivator
14 references to IViewComponentActivator
Microsoft.AspNetCore.Mvc.ViewFeatures (7)
DependencyInjection\MvcViewFeaturesMvcBuilderExtensions.cs (1)
53builder.Services.Replace(ServiceDescriptor.Singleton<IViewComponentActivator, ServiceBasedViewComponentActivator>());
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensions.cs (1)
173services.TryAddSingleton<IViewComponentActivator, DefaultViewComponentActivator>();
ViewComponents\DefaultViewComponentActivator.cs (1)
10/// A default implementation of <see cref="IViewComponentActivator"/>.
ViewComponents\DefaultViewComponentFactory.cs (3)
15private readonly IViewComponentActivator _activator; 23/// The <see cref="IViewComponentActivator"/> used to create new view component instances. 25public DefaultViewComponentFactory(IViewComponentActivator activator)
ViewComponents\ServiceBasedViewComponentActivator.cs (1)
9/// A <see cref="IViewComponentActivator"/> that retrieves view components as services from the request's
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (7)
DependencyInjection\MvcViewFeaturesMvcBuilderExtensionsTest.cs (2)
31var descriptor = Assert.Single(builder.Services.ToList(), d => d.ServiceType == typeof(IViewComponentActivator)); 153Assert.Equal(typeof(IViewComponentActivator), collection[2].ServiceType);
ViewComponentResultTest.cs (1)
670services.AddSingleton<IViewComponentActivator, DefaultViewComponentActivator>();
ViewComponents\DefaultViewComponentFactoryTest.cs (4)
19var activator = new Mock<IViewComponentActivator>(); 45var viewComponentActivator = new Mock<IViewComponentActivator>(); 68var viewComponentActivator = new Mock<IViewComponentActivator>(); 92var viewComponentActivator = new Mock<IViewComponentActivator>();