Exemplo n.º 1
0
 public NewsBlogClientApiController(IBlogService blogService, INewsItemService newsItemService, ISecurityService securityService, IImageService imageService)
 {
     _blogService     = blogService;
     _newsItemService = newsItemService;
     _securityService = securityService;
     _imageService    = imageService;
 }
Exemplo n.º 2
0
 public NewsItemApiController(IRepository <NewsItem> newsItemRepository, INewsItemService newsItemService, IMediaService mediaService, IWorkContext workContext)
 {
     _newsItemRepository = newsItemRepository;
     _newsItemService    = newsItemService;
     _mediaService       = mediaService;
     _workContext        = workContext;
 }
Exemplo n.º 3
0
 public PersonalBlogController(INewsItemService newsItemService, IPrincipalResolver principalResolver, IBlogService blogService, INewsCategoryService newsCategoryService)
 {
     _newsItemService     = newsItemService;
     _principalResolver   = principalResolver;
     _blogService         = blogService;
     _newsCategoryService = newsCategoryService;
 }
Exemplo n.º 4
0
 public NewsApiController(ISecurityService securityService, INewsItemService newsItemService, ISearchService searchService, ILogService logService)
 {
     _securityService = securityService;
     _newsItemService = newsItemService;
     _searchService   = searchService;
     _logService      = logService;
 }
Exemplo n.º 5
0
        public override IEnumerable <DynamicNode> GetDynamicNodeCollection(ISiteMapNode node)
        {
            INewsItemService newsItemService = DependencyResolver.Current.GetService <INewsItemService>();
            var nodes = new List <DynamicNode>();

            try
            {
                int total;
                var news = newsItemService.GetNewsPage(new NewsFilter()
                {
                    OnlyPosted = true
                }, 1, int.MaxValue, out total);
                foreach (var newsItem in news)
                {
                    DynamicNode dynamicNode = new DynamicNode();
                    // ключ должен быть уникальным для каждой ноды
                    dynamicNode.Key = "news_" + newsItem.HeartId;
                    dynamicNode.RouteValues.Add("relativeUrl", newsItem.CanonicalUrl);
                    dynamicNode.Route    = typeof(NewsItem).FullName;
                    dynamicNode.Title    = newsItem.Title;
                    dynamicNode.Protocol = "*";

                    dynamicNode.Attributes.Add("visibility", "MvcSiteMapProvider.Web.Mvc.XmlSiteMapResult");

                    nodes.Add(dynamicNode);
                }
            }
            catch (Exception e)
            {
                // если возникают косяки, не добавляем ничего в сайтмеп
            }

            return(nodes);
        }
 public NewsItemController(INewsItemService newsItemService, INewsItemCategoryService newsPubsService, ILocalizedPropertyService localizedPropertyService, IUrlRecordService urlRecordService, INewsItemTagService newsItemTagService)
 {
     _newsItemService          = newsItemService;
     _newsPubsService          = newsPubsService;
     _localizedPropertyService = localizedPropertyService;
     _urlRecordService         = urlRecordService;
     _newsItemTagService       = newsItemTagService;
 }
Exemplo n.º 7
0
 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;
 }
Exemplo n.º 8
0
 public NewsController(INewsItemService newsItemService, INewsCategoryService newsCategoryService, IBlogService blogService)
 {
     _newsItemService     = newsItemService;
     _newsCategoryService = newsCategoryService;
     _blogService         = blogService;
 }
Exemplo n.º 9
0
 public NewsItemController(INewsItemService newsItemService)
 {
     _newsItemService = newsItemService;
 }
Exemplo n.º 10
0
 public TagApiController(INewsItemService newsItemService, ILogService logService)
 {
     _newsItemService = newsItemService;
     _logService      = logService;
 }
Exemplo n.º 11
0
 public CategoryService(ICategoryRepository repo, INewsItemService newsItemService)
 {
     _repo            = repo;
     _newsItemService = newsItemService;
 }
 public NewsController(UserManager <ApplicationUser> userManager,
                       INewsItemService newsItemService)
 {
     _userManager     = userManager;
     _newsItemService = newsItemService;
 }
Exemplo n.º 13
0
 public NewsController(INewsItemService newsItem)
 {
     newsItemService = newsItem;
 }
Exemplo n.º 14
0
 public void Initialize()
 {
     _service = new NewsItemService(_newsItemRepositoryMock.Object, _categoryRelationRepositoryMock.Object, _authorRelationRepositoryMock.Object);
 }
Exemplo n.º 15
0
 /// <summary>
 /// Initialize repository
 /// </summary>
 /// <param name="authorRepository">Which implementation of author repository to use</param>
 public AuthorService(IAuthorRepository authorRepository, IAuthorNewsItemRelationRepository newsItemRelationRepository, INewsItemService newsItemService)
 {
     _authorRepository           = authorRepository;
     _newsItemRelationRepository = newsItemRelationRepository;
     _newsItemService            = newsItemService;
 }
Exemplo n.º 16
0
 public NewsItemController(INewsItemService newsItemService, IConfiguration config, IAuthentication authentication)
 {
     _newsItemService = newsItemService;
     Authentication   = authentication;
     Config           = config;
 }
Exemplo n.º 17
0
 /// <summary>
 /// Initialize repository
 /// </summary>
 /// <param name="categoryRepository">Which implementation of category repository to use</param>
 public CategoryService(ICategoryRepository categoryRepository, INewsItemCategoryRelationRepository newsItemRelationRepository, INewsItemService newsItemService)
 {
     _categoryRepository         = categoryRepository;
     _newsItemRelationRepository = newsItemRelationRepository;
     _newsItemService            = newsItemService;
 }
Exemplo n.º 18
0
 public NewsEditorController(INewsItemService newsItemService, IBlogService blogService)
 {
     _newsItemService = newsItemService;
     _blogService     = blogService;
 }