public override IEnumerable <DynamicNode> GetDynamicNodeCollection(ISiteMapNode node) { IHeartService categoryService = DependencyResolver.Current.GetService <IHeartService>(); var nodes = new List <DynamicNode>(); try { var categories = categoryService.GetHearts(typeof(Category).FullName); foreach (var category in categories) { DynamicNode dynamicNode = new DynamicNode(); // ключ должен быть уникальным для каждой ноды dynamicNode.Key = "category_" + category.HeartId; dynamicNode.RouteValues.Add("relativeUrl", category.RelativeUrl); dynamicNode.Route = typeof(Category).FullName; dynamicNode.Title = category.Title; dynamicNode.Protocol = "*"; dynamicNode.Attributes.Add("visibility", "MvcSiteMapProvider.Web.Mvc.XmlSiteMapResult"); nodes.Add(dynamicNode); } } catch (Exception e) { // если возникают косяки, не добавляем ничего в сайтмеп } return(nodes); }
public ShopCategoryService(ISettingsService settingsService, IShopActionService shopActionService, IHeartService heartService) { InitCache("ShopCategoryService"); _settingsService = settingsService; _shopActionService = shopActionService; _heartService = heartService; }
public ShopController(ISessionValueProviderService sessionService, IShopService shopService, ISearchService searchService, IShopClientService clientService, IShopActionService shopActionService, IShopCategoryService shopCategoryService, IShopManufacturerService shopManufacturerService, IPrincipalResolver principalResolver, IHeartService heartService, IShopOrderService shopOrderService, IShopPickupPointService pickupPointService) { _sessionService = sessionService; _shopService = shopService; _searchService = searchService; _clientService = clientService; _shopActionService = shopActionService; _shopCategoryService = shopCategoryService; _shopManufacturerService = shopManufacturerService; _principalResolver = principalResolver; _heartService = heartService; _shopOrderService = shopOrderService; _pickupPointService = pickupPointService; var service = DependencyResolver.Current.GetService <IShopSettingsService>(); try { var settings = service.GetShopSettings(); _shopUrl = String.IsNullOrEmpty(settings.ShopUrl) ? "catalog" : settings.ShopUrl; } catch { _shopUrl = "catalog"; } }
public ExportShopService(ISettingsService settingsService, ILogService logService, IShopService shopService, IShopCategoryService shopCategoryService, IHeartService heartService) { _settingsService = settingsService; _logService = logService; _shopService = shopService; _shopCategoryService = shopCategoryService; _heartService = heartService; }
public PageService(ISearchService searchService, ILogService logService, IHeartService heartService) { _searchService = searchService; _logService = logService; _heartService = heartService; InitCache("PageServiceMemoryCache"); CacheExpirationInMinutes = 30; //Reindex(); }
public RssCrawlingService(INewsItemService newsItemService, IAlbumService albumService, ISettingsService settingsService, IImageService imageService, ILogService logService, IHeartService heartService) { _newsItemService = newsItemService; _albumService = albumService; _settingsService = settingsService; _imageService = imageService; _logService = logService; _heartService = heartService; }
public NewsItemService(ISearchService searchService, INewsCategoryService categoryService, IBlogService blogService, IHeartService heartService) { _searchService = searchService; _categoryService = categoryService; _blogService = blogService; _heartService = heartService; InitCache("TagMemoryCache"); CacheExpirationInMinutes = 30; }
public ShopService(ILogService logService, IShopActionService shopActionService, IShopCategoryService shopCategoryService, IShopSpecService shopSpecService, IShopCompatiblesService shopCompatiblesService, IShopPackService shopPackService, IShopManufacturerService shopManufacturerService, IHeartService heartService, IShopGoodsReviewService goodsReviewService, ISearchService searchService) { _logService = logService; _shopActionService = shopActionService; _shopCategoryService = shopCategoryService; _shopSpecService = shopSpecService; _shopCompatiblesService = shopCompatiblesService; _shopPackService = shopPackService; _shopManufacturerService = shopManufacturerService; _heartService = heartService; _goodsReviewService = goodsReviewService; _searchService = searchService; InitCache("ShopService"); // Reindex(); // GenerateRelativeUrls(); }
public CommentService(IMapperService mapper, ISettingsService settingsService, ISecurityService securityService, ILogService logService, IHeartService heartService) : base(mapper) { _settingsService = settingsService; _securityService = securityService; _logService = logService; _heartService = heartService; // TODO: перенесено сюда для того, чтобы транзакции EF и EL не пересекались. // Убрать, когда переведём _settingsService на EL try { _premoderation = _settingsService.GetSettings <bool>(CommentsSettingStrings.CommentsPremoderation); } catch (Exception e) { _logService.LogError(e); _premoderation = true; } }
public ShopGoodsReviewService(IHeartService heartService) { _heartService = heartService; }
public PageApiController(IPageService pageService, ILogService logService, IHeartService heartService) { _pageService = pageService; _logService = logService; _heartService = heartService; }
public ShopActionService(IShopManufacturerService shopManufacturerService, IHeartService heartService) { _shopManufacturerService = shopManufacturerService; _heartService = heartService; }
public ShopManufacturerService(IHeartService heartService) { _heartService = heartService; }
public SearchService(IHeartService heartService) { _heartService = heartService; _rules = new Dictionary <Type, ICollection <IndexingRule> >(); InitCache(); }
public CommentsEditorController(ICommentService commentService, IHeartService heartService) { _commentService = commentService; _heartService = heartService; }
public HeartApiController(IHeartService heartService) { _heartService = heartService; }