thelarz / MvcBreadCrumbs

Custom BreadCrumbs for MVC
GNU General Public License v3.0
43 stars 28 forks source link

Some fixes, updates and general improvements #29

Closed brgrz closed 6 years ago

brgrz commented 7 years ago

See commits for details

thelarz commented 7 years ago

This looks interesting, thanks for all your effort. Was there a particular reason for updating to the 4.6 framework?

Sent from my iPhone

On Jul 25, 2017, at 9:20 AM, mare notifications@github.com wrote:

See commits for details

You can view, comment on, or merge this pull request online at:

https://github.com/thelarz/MvcBreadCrumbs/pull/29

Commit Summary

raised .net framework target to 4.6 updated asp.net nuget packages to modern versions docs state that if [BreadCrumb] attribute is used at controller level and no labels are provided the action name should be used but this didn't work, this fixes it introduced hierarchy by switching State to SortedSet and using the number of slashes in the url to determine the hierarchy level formatting (spaces -> tabs) introduced Manul mode for BreadCrumbAttribute modified State and BreadCrumb classes so that state crumbs are protected (private set) and allow single point of modification (previously BreadCrumb class manipulated the breadcrumb trail now it uses the State public methods to do so) fixed to pass on the action context Use local path only instead of the whole absolute url Context can be null in State when manually adding crumbs, so handle the NullReferenceException accordingly File Changes

M .vs/MvcBreadCrumbs/v14/.suo (0) M MvcBreadCrumbs/BreadCrumb.cs (319) M MvcBreadCrumbs/BreadCrumbAttribute.cs (78) A MvcBreadCrumbs/DefaultHierarchyProvider.cs (20) M MvcBreadCrumbs/HttpSessionProvider.cs (36) A MvcBreadCrumbs/IHierarchyProvider.cs (8) M MvcBreadCrumbs/IProvideBreadCrumbsSession.cs (8) M MvcBreadCrumbs/MvcBreadCrumbs.csproj (28) M MvcBreadCrumbs/ResourceHelper.cs (58) M MvcBreadCrumbs/State.cs (249) M MvcBreadCrumbs/StateManager.cs (52) M MvcBreadCrumbs/packages.config (6) Patch Links:

https://github.com/thelarz/MvcBreadCrumbs/pull/29.patch https://github.com/thelarz/MvcBreadCrumbs/pull/29.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

brgrz commented 7 years ago

No particular reason it's just that v4 is a couple years old and I like to keep my projects as close to the latest framework versions as possible.

But you could revert it I guess.