101 implementations of IComponent
Microsoft.AspNetCore.Components (9)
Microsoft.AspNetCore.Components.Authorization.Tests (1)
Microsoft.AspNetCore.Components.Endpoints (5)
Microsoft.AspNetCore.Components.Endpoints.Tests (7)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.QuickGrid (1)
Microsoft.AspNetCore.Components.QuickGrid.Tests (1)
Microsoft.AspNetCore.Components.Server.Tests (14)
Microsoft.AspNetCore.Components.Tests (47)
Microsoft.AspNetCore.Components.Web (5)
Microsoft.AspNetCore.Components.Web.Tests (5)
Microsoft.AspNetCore.Components.WebView.Maui (1)
Microsoft.AspNetCore.Components.WebView.Test (2)
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
Microsoft.AspNetCore.Components.WebView.Wpf (1)
266 references to IComponent
Microsoft.AspNetCore.Components (70)
RenderTree\Renderer.cs (18)
35private readonly Dictionary<IComponent, ComponentState> _componentStateByComponent = new Dictionary<IComponent, ComponentState>();
165protected internal virtual IComponentRenderMode? GetComponentRenderMode(IComponent component)
172/// Resolves the component state for a given <see cref="IComponent"/> instance.
174/// <param name="component">The <see cref="IComponent"/> instance</param>
176protected internal ComponentState GetComponentState(IComponent component)
225protected IComponent InstantiateComponent([DynamicallyAccessedMembers(Component)] Type componentType)
229/// Associates the <see cref="IComponent"/> with the <see cref="Renderer"/>, assigning
235protected internal int AssignRootComponentId(IComponent component)
268/// <param name="componentId">The ID returned by <see cref="AssignRootComponentId(IComponent)"/>.</param>
287/// <param name="componentId">The ID returned by <see cref="AssignRootComponentId(IComponent)"/>.</param>
397private ComponentState AttachAndInitComponent(IComponent component, int parentComponentId)
407internal void RegisterComponentState(IComponent component, int componentId, ComponentState componentState)
422protected virtual ComponentState CreateComponentState(int componentId, IComponent component, ComponentState? parentComponentState)
501if (callback.Receiver is IComponent receiverComponent) // The receiver might be null or not an IComponent
613var newComponent = _componentFactory.InstantiateComponent(_serviceProvider, frame.ComponentTypeField, callerSpecifiedRenderMode, parentComponentId);
1339/// <returns>An <see cref="IComponent"/> instance.</returns>
1340protected internal virtual IComponent ResolveComponentForRenderMode(
Microsoft.AspNetCore.Components.Analyzers.Tests (5)
Microsoft.AspNetCore.Components.Authorization.Tests (9)
Microsoft.AspNetCore.Components.CustomElements (1)
Microsoft.AspNetCore.Components.Endpoints (19)
Microsoft.AspNetCore.Components.Endpoints.Tests (19)
Microsoft.AspNetCore.Components.Forms.Tests (9)
Microsoft.AspNetCore.Components.QuickGrid.Tests (9)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Microsoft.AspNetCore.Components.Server (4)
Microsoft.AspNetCore.Components.Server.Tests (2)
Microsoft.AspNetCore.Components.Tests (57)
ComponentFactoryTest.cs (18)
22var instance = factory.InstantiateComponent(GetServiceProvider(), componentType, null, null);
39Assert.StartsWith($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", ex.Message);
50var instance = factory.InstantiateComponent(GetServiceProvider(), componentType, null, null);
83var instance = factory.InstantiateComponent(GetServiceProvider(), componentType, null, null);
110var instance = factory.InstantiateComponent(serviceProvider, componentType, null, null);
131var instance = factory.InstantiateComponent(serviceProvider, componentType, null, null);
245var instance = factory.InstantiateComponent(serviceProvider, componentType, null, null);
268var instance = factory.InstantiateComponent(serviceProvider, componentType, null, null);
312var instance = factory.InstantiateComponent(serviceProvider, requestedType, null, null);
336var instance = factory.InstantiateComponent(serviceProvider, requestedType, null, null);
369var instance = factory.InstantiateComponent(serviceProvider, requestedType, null, null);
601private class CustomComponentActivator<TResult> : IComponentActivator where TResult : IComponent, new()
603public IComponent CreateInstance(Type componentType)
611public IComponent CreateInstance(Type componentType)
624public Action<IServiceProvider, IComponent> GetActivator(Type componentType)
675private readonly IComponent _componentToReturn;
677public RendererWithResolveComponentForRenderMode(IComponent componentToReturn) : base()
700protected internal override IComponent ResolveComponentForRenderMode(Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
Microsoft.AspNetCore.Components.Web (24)
Microsoft.AspNetCore.Components.Web.Tests (10)
Microsoft.AspNetCore.Components.WebAssembly (13)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.Components.WebView.Maui (1)
Microsoft.AspNetCore.Components.WebView.Photino (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (6)
Microsoft.AspNetCore.Components.WebView.Wpf (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Wasm.Performance.ConsoleHost (1)