DamianEdwards / RazorSlices

Lightweight Razor-based templates for ASP.NET Core without MVC, Razor Pages, or Blazor.
MIT License
297 stars 12 forks source link

#3 Support @inject to enable declaring dependency-injected properties and more #21

Closed madeyoga closed 1 year ago

madeyoga commented 1 year ago

Regarding the first suggestions from #3. I have made the following changes to the code:

private static readonly ReadOnlyDictionary<string, SliceDefinition> _slicesByName;
private static readonly ReadOnlyDictionary<Type, SliceDefinition> _slicesByType;

I'm still getting familiar with the codebase, so please let me know if I missed anything or if there's a better way to do something.

I will keep working on this pull request.