-
-
Notifications
You must be signed in to change notification settings - Fork 115
Support controlling render modes and RendererInfo during testing #1596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7a4dd4a to
62c724c
Compare
e835c6c to
948af35
Compare
|
@linkdotnet force pushed some changes! I think this is done, but there may be some improvements to the code before we merge in. |
|
Just tagging @scottsauber and @linkdotnet to see if you have suggestions to improve the code. Did some changes after the stream. Still missing a documentation page. |
| /// Gets or sets the <see cref="IComponentRenderMode"/> that will be specified in | ||
| /// the render tree for component the parameters are being passed to. | ||
| /// </summary> | ||
| public IComponentRenderMode? RenderMode { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the ToRenderFragment method should probably have been on the builder, but that we can move in V2, where the types are internal.
| /// </summary> | ||
| /// <param name="renderMode">The render mode to assign to the component, e.g. <c>RenderMode.InteractiveServer</c>, or <see langword="null"/>, to not assign a specific render mode.</param> | ||
| /// <returns>This <see cref="ComponentParameterCollectionBuilder{TComponent}"/>.</returns> | ||
| public ComponentParameterCollectionBuilder<TComponent> SetAssignedRenderMode(IComponentRenderMode? renderMode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set still seems like the right name. Matches the SetRendererInfo on Renderer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, yeah see comment above
| { | ||
| builder.OpenComponent<TComponent>(0); | ||
| AddAttributes(builder); | ||
| #if NET9_0_OR_GREATER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetRenderMode would be better as this doesn’t have collection like behavior
14cdc53 to
8588ad5
Compare
6e16a75 to
9782ad9
Compare
.net 9 related changes
@rendermodeon elementtop level @rendermode