v4.6.0
OnTopic 4.6.0 includes a few minor features, most notably improvements over routing and reporting for the ASP.NET Core TopicController. In addition, it upgrades the underlying code to C# 9.0 in order to take advantage of some new capabilities such as improved pattern matching and implicitly typed initializers.
Features
- Updated
[ValidateTopic]attribute to redirect to canonical URL to ensure consistency in analytics, indexes (0edab34) - Updated
Topic.Load(RouteData)extension to return null if an invalidKeyis submitted (b303f13); this results in theTopicControllertreating incorrect topic paths (e.g.,/Web/!@~/) as 404s instead of exceptions - Added support for enabling (
IsIndexed) and configuring (IndexLabel) an optional table of contents to theContentListTopicViewModel(e9ccb06)
Bug Fixes
- Fixed issue with where the delegate is validated in the
HierarchicalTopicMappingService.GetViewModelAsnc()method (69dff49)
Improvements
- Updated code to use C# 9.0 pattern matching and implicitly typed initializers (d63f2b5)
- Updated to latest versions of internal packages, and implemented (4838da8)
- Updated to latest version of Code Analysis and fixed most issues introduced with C# 9.0 (089c96a)
Note: There are some Code Analysis false positives that remain with C# 9.0. Those are presumably fixed with the new
Microsoft.CodeAnalysis.NetAnalyzers5.0.0. There appears to be a bug in getting that to work with .NET 3.x projects, however, so it's not yet implemented. That will be revisited in a future release.