Skip to content
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

fix: New up renderer for markup matches #1160

Merged
merged 3 commits into from
Jul 23, 2023
Merged

Conversation

linkdotnet
Copy link
Collaborator

Newing up a renderer for MarkupMatches to prevent being deadlocked to renderer the expected RenderFragment.

@linkdotnet linkdotnet requested a review from egil July 19, 2023 08:56
tests/.editorconfig Outdated Show resolved Hide resolved
@linkdotnet linkdotnet merged commit 76fd92f into main Jul 23, 2023
4 checks passed
@linkdotnet linkdotnet deleted the fix/fragment-container branch July 23, 2023 18:05
using var renderer = new TestRenderer(
actual.Services.GetRequiredService<IRenderedComponentActivator>(),
actual.Services.GetRequiredService<TestServiceProvider>(),
actual.Services.GetRequiredService<ILoggerFactory>());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI you can use ActivatorUtilities.CreateInstance to create a new instance while automatically supplying existing services. Makes it less brittle if new services are needed in the future, too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting one. I would still prefer the explicit new but a nice addition in any case.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants