You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* builder.AddComponentRenderMode API and storage on RenderTree
* Extend ResolveComponentForRenderMode to receive callerSpecifiedRenderMode, and supply it from ComponentFactory
* Simplify API: collapse the two rendermode sources into a single rendermode before calling ResolveComponentForRenderMode
* Corresponding renames
* Actually supply callsite rendermode from RenderTree
* Give clearer errors if misusing this feature
* Build fix
* Actually use the parameter name @rendermode for forward-compatibility with the final syntax
* Add E2E tests
:thrownewInvalidOperationException($"The component type '{componentType}' has a fixed rendermode of '{componentTypeRenderMode}', so it is not valid to specify any rendermode when using this component.");
thrownewInvalidOperationException($"The {nameof(ComponentRenderMode)} field only exists on frames of type {nameof(RenderTreeFrameType.ComponentRenderMode)}.");
/// Determines how to handle an <see cref="IComponentRenderMode"/> when obtaining a component instance.
1149
-
/// This is only called for components that have specified a render mode. Subclasses may override this
1150
-
/// method to return a component of a different type, or throw, depending on whether the renderer
1178
+
/// This is only called when a render mode is specified either at the call site or on the component type.
1179
+
///
1180
+
/// Subclasses may override this method to return a component of a different type, or throw, depending on whether the renderer
1151
1181
/// supports the render mode and how it implements that support.
1152
1182
/// </summary>
1153
1183
/// <param name="componentType">The type of component that was requested.</param>
1154
1184
/// <param name="parentComponentId">The parent component ID, or null if it is a root component.</param>
1155
1185
/// <param name="componentActivator">An <see cref="IComponentActivator"/> that should be used when instantiating component objects.</param>
1156
-
/// <param name="componentTypeRenderMode">The <see cref="IComponentRenderMode"/> declared on <paramref name="componentType"/>.</param>
1186
+
/// <param name="renderMode">The <see cref="IComponentRenderMode"/> declared on <paramref name="componentType"/> or at the call site (for example, by the parent component).</param>
// Nothing is supported by default. Subclasses must override this to opt into supporting specific render modes.
1165
-
thrownewNotSupportedException($"Cannot supply a component of type '{componentType}' because the current platform does not support the render mode '{componentTypeRenderMode}'.");
1195
+
thrownewNotSupportedException($"Cannot supply a component of type '{componentType}' because the current platform does not support the render mode '{renderMode}'.");
0 commit comments