public BreadcrumbTagHelper(BreadcrumbManager breadcrumbManager, IUrlHelperFactory urlHelperFactory, IActionContextAccessor actionContextAccessor, HtmlEncoder htmlEncoder) { _breadcrumbManager = breadcrumbManager; _htmlEncoder = htmlEncoder; _urlHelper = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext); IStringLocalizerFactory factory = (IStringLocalizerFactory)actionContextAccessor.ActionContext.HttpContext.RequestServices.GetService(typeof(IStringLocalizerFactory)); if (factory != null && BreadcrumbManager.Options.ResourceType != null) { _localizer = factory.Create(BreadcrumbManager.Options.ResourceType); } }
public BreadcrumbTagHelper(BreadcrumbManager breadcrumbManager, IUrlHelperFactory urlHelperFactory, IActionContextAccessor actionContextAccessor, HtmlEncoder htmlEncoder) { _breadcrumbManager = breadcrumbManager; _htmlEncoder = htmlEncoder; _urlHelper = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext); IStringLocalizerFactory factory = (IStringLocalizerFactory)actionContextAccessor.ActionContext.HttpContext.RequestServices.GetService(typeof(IStringLocalizerFactory)); if (factory != null && BreadcrumbManager.Options.ResourceType != null) { var type = BreadcrumbManager.Options.ResourceType; var assemblyName = new AssemblyName(type.GetTypeInfo().Assembly.FullName); _localizer = factory.Create(BreadcrumbManager.Options.ResourceType.Name, assemblyName.Name); } }
public BreadcrumbTagHelper(BreadcrumbManager breadcrumbManager, IUrlHelperFactory urlHelperFactory, IActionContextAccessor actionContextAccessor) { _breadcrumbManager = breadcrumbManager; _urlHelper = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext); }