private static void UseBreadcrumbs(IServiceCollection services, Assembly assembly, BreadcrumbOptions options)
        {
            var bm = new BreadcrumbsManager();

            bm.Initialize(assembly, options);
            services.AddSingleton(bm);
            services.TryAddScoped <IActionContextAccessor, ActionContextAccessor>();
        }
Exemplo n.º 2
0
 public BreadcrumbTagHelper(BreadcrumbsManager breadcrumbsManager, IUrlHelperFactory urlHelperFactory, IActionContextAccessor actionContextAccessor)
 {
     _breadcrumbsManager = breadcrumbsManager;
     _urlHelper          = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext);
 }
Exemplo n.º 3
0
 public BreadcrumbTagHelper(BreadcrumbsManager breadcrumbsManager, IActionContextAccessor actionContextAccessor)
 {
     _breadcrumbsManager = breadcrumbsManager;
     _urlHelper          = new UrlHelper(actionContextAccessor.ActionContext);
 }