Closed madeyoga closed 1 year ago
Currently, there is no overload that accepts both a string parameter for the slice name and an
IServiceProvider
. We could consider adding the following methods to address this:
That's a good idea. If you want to do that as part of this PR go ahead, or just log an issue with the details and we can do it separately.
I have made the following changes to the code:
RazorSlice.ResolveAndCreate
I named the static class
RazorSliceStringBuilderExtensions
.Usage
Render to a StringBuilder
Render to a string
I believe that with the introduction of these extensions, we will need to make the process of creating a slice easier, particularly for slices that have dependency-injected properties.
Currently, there is no overload that accepts both a string parameter for the slice name and an IServiceProvider. We could consider adding the following methods to address this:
These methods incur a lookup cost each time they're invoked, which may affect performance. Given this, should we still consider adding them?