Repository navigation
Migrate IRenderedFragment extension method to v2 IRenderedComponent<TComponent> #1789
|
Currently i have the following extension method on IRenderedFragment but struggling as to how to move it to IRenderedComponent, would any body have any suggestions on it ? |
Answered by
linkdotnet
Dec 8, 2025
Replies: 2 comments
|
You can easily exchange this with Edit: The interface is covariant: |
0 replies
Answer selected by
madhon
|
Thats worked, many thanks. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can easily exchange this with
IRenderedComponent<IComponent>:Edit: The interface is covariant:
IRenderedComponent<out IComponent>- therefore it automatically works automatically for every component. As you don't need the type itself, you don't needTComponenthere.