11 implementations of IComponentRenderMode
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
EndpointHtmlRendererTest.cs (1)
639class NonexistentRenderMode : IComponentRenderMode { }
RazorComponentEndpointFactoryTest.cs (1)
168class TestRenderMode : IComponentRenderMode { }
Microsoft.AspNetCore.Components.Tests (6)
ComponentFactoryTest.cs (2)
378private class TestRenderMode : IComponentRenderMode { } 379private class DerivedComponentRenderMode : IComponentRenderMode { }
Lifetime\ComponentStatePersistenceManagerTest.cs (1)
313private class TestRenderMode : IComponentRenderMode
RendererTest.cs (2)
5137public class UnknownRenderMode : IComponentRenderMode { } 5152private class SubstituteComponentRenderMode : IComponentRenderMode { }
Rendering\RenderTreeBuilderTest.cs (1)
2306class TestRenderMode : IComponentRenderMode { }
Microsoft.AspNetCore.Components.Web (3)
RenderMode\InteractiveAutoRenderMode.cs (1)
9public class InteractiveAutoRenderMode : IComponentRenderMode
RenderMode\InteractiveServerRenderMode.cs (1)
9public class InteractiveServerRenderMode : IComponentRenderMode
RenderMode\InteractiveWebAssemblyRenderMode.cs (1)
9public class InteractiveWebAssemblyRenderMode : IComponentRenderMode
150 references to IComponentRenderMode
Microsoft.AspNetCore.Components (35)
ComponentBase.cs (3)
25private (IComponentRenderMode? mode, bool cached) _renderMode; 56/// Gets the <see cref="IComponentRenderMode"/> assigned to this component. 58protected IComponentRenderMode? AssignedRenderMode
ComponentFactory.cs (6)
39var componentTypeRenderMode = componentType.GetCustomAttribute<RenderModeAttribute>()?.Mode; 49public IComponent InstantiateComponent(IServiceProvider serviceProvider, [DynamicallyAccessedMembers(Component)] Type componentType, IComponentRenderMode? callerSpecifiedRenderMode, int? parentComponentId) 62var effectiveRenderMode = callerSpecifiedRenderMode is null 162public IComponentRenderMode? ComponentTypeRenderMode { get; } 167IComponentRenderMode? componentTypeRenderMode, 175out IComponentRenderMode? componentTypeRenderMode,
Infrastructure\ComponentStatePersistenceManager.cs (1)
108var componentRenderMode = renderer.GetComponentRenderMode(component);
IPersistentComponentStateStore.cs (3)
25/// Returns a value that indicates whether the store supports the given <see cref="IComponentRenderMode"/>. 27/// <param name="renderMode">The <see cref="IComponentRenderMode"/> in question.</param> 29bool SupportsRenderMode(IComponentRenderMode renderMode) => true;
PersistComponentStateRegistration.cs (2)
8IComponentRenderMode? renderMode) 12public IComponentRenderMode? RenderMode { get; } = renderMode;
PersistentComponentState.cs (1)
55public PersistingComponentStateSubscription RegisterOnPersisting(Func<Task> callback, IComponentRenderMode? renderMode)
RenderHandle.cs (3)
60/// Retrieves the <see cref="IComponentRenderMode"/> assigned to the component. 62/// <returns>The <see cref="IComponentRenderMode"/> assigned to the component.</returns> 63public IComponentRenderMode? RenderMode
Rendering\RenderTreeBuilder.cs (2)
629/// <param name="renderMode">The <see cref="IComponentRenderMode"/>.</param> 630public void AddComponentRenderMode(IComponentRenderMode? renderMode)
RenderModeAttribute.cs (1)
19public abstract IComponentRenderMode Mode { get; }
RenderTree\Renderer.cs (8)
138/// Gets the <see cref="IComponentRenderMode"/> for a given component if available. 142protected internal virtual IComponentRenderMode? GetComponentRenderMode(IComponent component) 145internal IComponentRenderMode? GetComponentRenderMode(int componentId) 537var callerSpecifiedRenderMode = frame.ComponentFrameFlags.HasFlag(ComponentFrameFlags.HasCallerSpecifiedRenderMode) 549private static IComponentRenderMode? FindCallerSpecifiedRenderMode(RenderTreeFrame[] frames, int componentFrameIndex) 1245/// Determines how to handle an <see cref="IComponentRenderMode"/> when obtaining a component instance. 1254/// <param name="renderMode">The <see cref="IComponentRenderMode"/> declared on <paramref name="componentType"/> or at the call site (for example, by the parent component).</param> 1260IComponentRenderMode renderMode)
RenderTree\RenderTreeFrame.cs (4)
264[FieldOffset(16)] internal IComponentRenderMode ComponentRenderModeField; 268/// gets the specified <see cref="IComponentRenderMode"/>. Otherwise, the value is undefined. 270public IComponentRenderMode ComponentRenderMode 420internal static RenderTreeFrame ComponentRenderModeFrame(int sequence, IComponentRenderMode renderMode)
RenderTree\RenderTreeFrameArrayBuilder.cs (1)
138public void AppendComponentRenderMode(IComponentRenderMode renderMode)
Microsoft.AspNetCore.Components.Authorization.Tests (1)
src\Components\Shared\test\AssertFrame.cs (1)
144public static void ComponentRenderMode(RenderTreeFrame frame, IComponentRenderMode mode)
Microsoft.AspNetCore.Components.Endpoints (41)
Builder\ComponentEndpointConventionBuilderHelper.cs (1)
19public static void AddRenderMode(RazorComponentsEndpointConventionBuilder builder, IComponentRenderMode renderMode)
Builder\ConfiguredRenderModesMetadata.cs (2)
6internal class ConfiguredRenderModesMetadata(IComponentRenderMode[] configuredRenderModes) 8public IComponentRenderMode[] ConfiguredRenderModes => configuredRenderModes;
Builder\RazorComponentDataSourceOptions.cs (4)
16internal static readonly EqualityComparer<IComponentRenderMode> RenderModeComparer = EqualityComparer<IComponentRenderMode> 33internal ISet<IComponentRenderMode> ConfiguredRenderModes { get; } = new HashSet<IComponentRenderMode>(RenderModeComparer);
Builder\RazorComponentEndpointDataSource.cs (2)
134ICollection<IComponentRenderMode> renderModes = Options.ConfiguredRenderModes; 135foreach (var renderMode in renderModes)
Builder\RazorComponentsEndpointConventionBuilder.cs (1)
75internal void AddRenderMode(IComponentRenderMode renderMode)
Builder\RenderModeEndpointProvider.cs (7)
13/// A provider that can register endpoints to support a specific <see cref="IComponentRenderMode"/>. 20/// <param name="renderMode">The <see cref="IComponentRenderMode"/>.</param> 21/// <returns><c>true</c> if the <see cref="IComponentRenderMode"/> is supported; <c>false</c> otherwise.</returns> 22public abstract bool Supports(IComponentRenderMode renderMode); 27/// <param name="renderMode">The <see cref="IComponentRenderMode"/>.</param> 31IComponentRenderMode renderMode, 38IComponentRenderMode renderMode,
DependencyInjection\IComponentPrerenderer.cs (2)
27IComponentRenderMode renderMode, 41/// Gets a <see cref="Dispatcher"/> that should be used for calls to <see cref="PrerenderComponentAsync(HttpContext, Type, IComponentRenderMode, ParameterView)"/>.
Discovery\ComponentInfo.cs (3)
15private IComponentRenderMode? _renderMode; 33/// Gets the component <see cref="IComponentRenderMode"/>. 35public IComponentRenderMode? RenderMode
Discovery\RazorComponentApplication.cs (2)
37public ISet<IComponentRenderMode> GetDeclaredRenderModesByDiscoveredComponents() 39var set = new HashSet<IComponentRenderMode>();
Rendering\EndpointHtmlRenderer.Prerendering.cs (4)
19protected override IComponent ResolveComponentForRenderMode([DynamicallyAccessedMembers(Component)] Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode) 43protected override IComponentRenderMode? GetComponentRenderMode(IComponent component) 88IComponentRenderMode prerenderMode, 97IComponentRenderMode? prerenderMode,
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (4)
158internal static void UpdateSaveStateRenderMode(HttpContext httpContext, IComponentRenderMode? mode) 186private static bool ModeEnablesPrerendering(IComponentRenderMode? mode) => mode switch 263internal class CopyOnlyStore<T> : IPersistentComponentStateStore where T : IComponentRenderMode 275public bool SupportsRenderMode(IComponentRenderMode renderMode) => renderMode is T;
Rendering\SSRRenderModeBoundary.cs (7)
32public IComponentRenderMode RenderMode { get; } 37IComponentRenderMode renderMode) 52private static void AssertRenderModeIsConfigured(HttpContext httpContext, Type componentType, IComponentRenderMode renderMode) 78private static void AssertRenderModeIsConfigured<TRequiredMode>(Type componentType, IComponentRenderMode specifiedMode, IComponentRenderMode[] configuredModes, string expectedCall) where TRequiredMode : IComponentRenderMode 80foreach (var configuredMode in configuredModes)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
72public virtual bool SupportsRenderMode(IComponentRenderMode renderMode) =>
src\Shared\Components\ProtectedPrerenderComponentApplicationStore.cs (1)
33public override bool SupportsRenderMode(IComponentRenderMode renderMode) =>
Microsoft.AspNetCore.Components.Endpoints.Tests (42)
EndpointHtmlRendererTest.cs (8)
1195public static TheoryData<IComponentRenderMode> SingleComponentRenderModeData => new TheoryData<IComponentRenderMode> 1203public async Task PrerenderedState_SelectsSingleStoreCorrectly(IComponentRenderMode renderMode) 1255IComponentRenderMode persistenceMode = renderMode switch 1309IComponentRenderMode configuredMode = declaredRenderMode switch 1378IComponentRenderMode persistenceMode = renderMode switch 1434IComponentRenderMode persistenceMode = renderMode switch 1442IComponentRenderMode configuredMode = declared switch
HotReloadServiceTests.cs (4)
232IComponentRenderMode[] renderModes = null) 243foreach (var mode in renderModes) 263public override IEnumerable<RouteEndpointBuilder> GetEndpointBuilders(IComponentRenderMode renderMode, IApplicationBuilder applicationBuilder) 271public override bool Supports(IComponentRenderMode renderMode) => true;
RazorComponentEndpointDataSourceTest.cs (23)
47public static TheoryData<IComponentRenderMode[], Type[], Type[], string[]> ConfiguredAndDiscoveredRenderModes => 52Array.Empty<IComponentRenderMode>(), 73new IComponentRenderMode [] { RenderMode.InteractiveServer, RenderMode.InteractiveWebAssembly }, 80Array.Empty<IComponentRenderMode>(), 102new IComponentRenderMode [] { RenderMode.InteractiveServer, RenderMode.InteractiveWebAssembly }, 109Array.Empty<IComponentRenderMode>(), 131new IComponentRenderMode [] { RenderMode.InteractiveServer, RenderMode.InteractiveWebAssembly }, 139public static TheoryData<IComponentRenderMode[], Type[], Type[]> SetRenderModesFailures => 144Array.Empty<IComponentRenderMode>(), 150Array.Empty<IComponentRenderMode>(), 156Array.Empty<IComponentRenderMode>(), 163Array.Empty<IComponentRenderMode>(), 169Array.Empty<IComponentRenderMode>(), 175new IComponentRenderMode[] { RenderMode.InteractiveServer }, 182Array.Empty<IComponentRenderMode>(), 189Array.Empty<IComponentRenderMode>(), 196new IComponentRenderMode[] { RenderMode.InteractiveWebAssembly }, 235IComponentRenderMode[] renderModes = null) 246foreach (var mode in renderModes) 266public override IEnumerable<RouteEndpointBuilder> GetEndpointBuilders(IComponentRenderMode renderMode, IApplicationBuilder applicationBuilder) 274public override bool Supports(IComponentRenderMode renderMode) => renderMode is InteractiveServerRenderMode or InteractiveAutoRenderMode; 279public override IEnumerable<RouteEndpointBuilder> GetEndpointBuilders(IComponentRenderMode renderMode, IApplicationBuilder applicationBuilder) 287public override bool Supports(IComponentRenderMode renderMode) => renderMode is InteractiveWebAssemblyRenderMode or InteractiveAutoRenderMode;
RazorComponentEndpointFactoryTest.cs (4)
74new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 102new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 130new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 162new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>()));
SSRRenderModeBoundaryTest.cs (1)
84private static void PrepareEndpoint(HttpContext httpContext, params IComponentRenderMode[] configuredModes)
TestRenderModeAttribute.cs (2)
6internal class TestRenderModeAttribute<T> : RenderModeAttribute where T: IComponentRenderMode, new() 8public override IComponentRenderMode Mode { get; } = new T();
Microsoft.AspNetCore.Components.Forms.Tests (1)
src\Components\Shared\test\AssertFrame.cs (1)
144public static void ComponentRenderMode(RenderTreeFrame frame, IComponentRenderMode mode)
Microsoft.AspNetCore.Components.Server (6)
Circuits\RemoteRenderer.cs (2)
67protected override IComponentRenderMode? GetComponentRenderMode(IComponent component) => RenderMode.InteractiveServer; 309protected override IComponent ResolveComponentForRenderMode([DynamicallyAccessedMembers(Component)] Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (2)
58IComponentRenderMode renderMode, 113public override bool Supports(IComponentRenderMode renderMode)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
72public virtual bool SupportsRenderMode(IComponentRenderMode renderMode) =>
src\Shared\Components\ProtectedPrerenderComponentApplicationStore.cs (1)
33public override bool SupportsRenderMode(IComponentRenderMode renderMode) =>
Microsoft.AspNetCore.Components.Tests (9)
ComponentFactoryTest.cs (5)
223var callsiteRenderMode = componentType.GetCustomAttribute<RenderModeAttribute>().Mode; 386public override IComponentRenderMode Mode => new DerivedComponentRenderMode(); 405public override IComponentRenderMode Mode => new TestRenderMode(); 422public IComponentRenderMode SuppliedRenderMode { get; private set; } 436protected internal override IComponent ResolveComponentForRenderMode(Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
RendererTest.cs (3)
5122public override IComponentRenderMode Mode => new SubstituteComponentRenderMode(); 5134public override IComponentRenderMode Mode => new UnknownRenderMode(); 5142protected internal override IComponent ResolveComponentForRenderMode(Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
src\Components\Shared\test\AssertFrame.cs (1)
144public static void ComponentRenderMode(RenderTreeFrame frame, IComponentRenderMode mode)
Microsoft.AspNetCore.Components.Web (7)
RenderMode\InteractiveAutoRenderMode.cs (1)
7/// A <see cref="IComponentRenderMode"/> indicating that the component should be interactive, with its hosting platform determined automatically based on a policy.
RenderMode\InteractiveServerRenderMode.cs (1)
7/// A <see cref="IComponentRenderMode"/> indicating that the component should be rendered interactively on the server using Blazor Server hosting.
RenderMode\InteractiveWebAssemblyRenderMode.cs (1)
7/// A <see cref="IComponentRenderMode"/> indicating that the component should be rendered interactively on the client using WebAssembly.
RenderMode\RenderMode.cs (4)
7/// Provides pre-constructed <see cref="IComponentRenderMode"/> instances that may be used during rendering. 12/// Gets an <see cref="IComponentRenderMode"/> that represents rendering interactively on the server via Blazor Server hosting 18/// Gets an <see cref="IComponentRenderMode"/> that represents rendering interactively on the client via Blazor WebAssembly hosting 24/// Gets an <see cref="IComponentRenderMode"/> that means the render mode will be determined automatically based on a policy.
Microsoft.AspNetCore.Components.Web.Tests (1)
src\Components\Shared\test\AssertFrame.cs (1)
144public static void ComponentRenderMode(RenderTreeFrame frame, IComponentRenderMode mode)
Microsoft.AspNetCore.Components.WebAssembly (3)
Rendering\WebAssemblyRenderer.cs (2)
79protected override IComponentRenderMode? GetComponentRenderMode(IComponent component) => RenderMode.InteractiveWebAssembly; 187protected override IComponent ResolveComponentForRenderMode([DynamicallyAccessedMembers(Component)] Type componentType, int? parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
72public virtual bool SupportsRenderMode(IComponentRenderMode renderMode) =>
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
WebAssemblyEndpointProvider.cs (2)
17public override IEnumerable<RouteEndpointBuilder> GetEndpointBuilders(IComponentRenderMode renderMode, IApplicationBuilder applicationBuilder) 50public override bool Supports(IComponentRenderMode renderMode) =>
Microsoft.AspNetCore.Mvc.TagHelpers (1)
ComponentTagHelper.cs (1)
99var renderMode = HtmlHelperComponentExtensions.MapRenderMode(RenderMode);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Rendering\HtmlHelperComponentExtensions.cs (1)
70internal static IComponentRenderMode MapRenderMode(RenderMode renderMode) => renderMode switch