Exemple #1
0
 public AkismetSpamCheck(IWeBlogCommentSettings commentSettings, IBlogManager blogManager, IAkismet akismetApi, BaseLinkManager linkManager)
 {
     _commentSettings = commentSettings ?? ServiceLocator.ServiceProvider.GetRequiredService <IWeBlogCommentSettings>();
     _blogManager     = blogManager ?? ManagerFactory.BlogManagerInstance;
     _akismetApi      = akismetApi;
     _linkManager     = linkManager ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseLinkManager>();
 }
Exemple #2
0
 public void Setup()
 {
     this.PageTemplateId          = ID.NewID;
     this.NonNavigationTemplateId = ID.NewID;
     this.LinkManager             = Substitute.For <BaseLinkManager>();
     this.NavigationService       = new NavigationService(this.LinkManager, new ItemExtensionsService());
 }
 public ProductListContentsResolver(IProductRepository productRepository, BaseLinkManager linkManager)
 {
     Debug.Assert(productRepository != null);
     Debug.Assert(linkManager != null);
     ProductRepository = productRepository;
     LinkManager       = linkManager;
 }
Exemple #4
0
 private BlogManager CreateBlogManager(BaseLinkManager linkManager = null, IWeBlogSettings settings = null, BaseTemplateManager templateManager = null)
 {
     return(new BlogManager(
                linkManager ?? Mock.Of <BaseLinkManager>(),
                templateManager ?? Mock.Of <BaseTemplateManager>(),
                settings ?? Mock.Of <IWeBlogSettings>()));
 }
Exemple #5
0
 public NavigationService(
     BaseLinkManager linkManager,
     IItemExtensionsService itemExtensions)
 {
     this.LinkManager    = linkManager;
     this.ItemExtensions = itemExtensions;
 }
 public HeaderBuilder(BaseLinkManager linkManager, INavigationRootResolver rootResolver)
 {
     Debug.Assert(linkManager != null);
     Debug.Assert(rootResolver != null);
     LinkManager  = linkManager;
     RootResolver = rootResolver;
 }
Exemple #7
0
 public AkismetSpamCheck(IWeBlogSettings settings, IBlogManager blogManager, IAkismet akismetApi, BaseLinkManager linkManager)
 {
     _settings    = settings ?? WeBlogSettings.Instance;
     _blogManager = blogManager ?? ManagerFactory.BlogManagerInstance;
     _akismetApi  = akismetApi;
     _linkManager = linkManager ?? ServiceLocator.ServiceProvider.GetService(typeof(BaseLinkManager)) as BaseLinkManager;
 }
        private TestableMetaBlogApi CreateAuthenticatingApi(
            IBlogManager blogManager         = null,
            ICategoryManager categoryManager = null,
            IEntryManager entryManager       = null,
            IWeBlogSettings settings         = null,
            BaseMediaManager mediaManager    = null,
            BaseLinkManager linkManager      = null
            )
        {
            IBlogSettingsResolver settingsResolver = null;

            if (settings != null)
            {
                settingsResolver = Mock.Of <IBlogSettingsResolver>(x =>
                                                                   x.Resolve(It.IsAny <BlogHomeItem>()) == new BlogSettings(settings)
                                                                   );
            }

            return(new TestableMetaBlogApi(
                       blogManager,
                       categoryManager,
                       entryManager,
                       settings,
                       mediaManager,
                       linkManager,
                       settingsResolver
                       )
            {
                AuthenticateFunction = (u, p) => { }
            });
        }
Exemple #9
0
        public Blog(IBlogManager blogManager, BaseLinkManager linkManager)
        {
            Assert.ArgumentNotNull(blogManager, nameof(blogManager));
            Assert.ArgumentNotNull(linkManager, nameof(linkManager));

            BlogManager = blogManager;
            LinkManager = linkManager;
        }
 public MetaBlogApi(
     IBlogManager blogManager,
     ICategoryManager categoryManager,
     IEntryManager entryManager,
     IWeBlogSettings settings,
     BaseMediaManager mediaManager,
     BaseLinkManager linkManager)
 {
 }
Exemple #11
0
        public BlogSyndicationController(ISyndicationInclude syndicationLink, BaseLinkManager linkManager)
            : base(syndicationLink)
        {
            Assert.ArgumentNotNull(syndicationLink, nameof(syndicationLink));
            Assert.ArgumentNotNull(linkManager, nameof(linkManager));

            SyndicationLink = syndicationLink;
            LinkManager     = linkManager;
        }
 public EnterspeedSitecoreUrlService(
     IEnterspeedConfigurationService enterspeedConfigurationService,
     BaseSiteContextFactory siteContextFactory,
     BaseLinkManager linkManager,
     BaseMediaManager mediaManager)
 {
     _enterspeedConfigurationService = enterspeedConfigurationService;
     _siteContextFactory             = siteContextFactory;
     _linkManager  = linkManager;
     _mediaManager = mediaManager;
 }
Exemple #13
0
        public Syndication(ISyndicationInclude sl, BaseLinkManager linkManager)
        {
            SyndicationLink = sl;

            if (SyndicationLink == null)
            {
                var feedResolver = ServiceLocator.ServiceProvider.GetRequiredService <IFeedResolver>();
                SyndicationLink = new SyndicationLink(feedResolver);
            }

            LinkManager = linkManager ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseLinkManager>();
        }
        public static string GetAbsoluteItemUrl(this BaseLinkManager linkManager, Item item)
        {
#if FEATURE_URL_BUILDERS
            var options = new ItemUrlBuilderOptions
#else
            var options = new UrlOptions
#endif
            {
                AlwaysIncludeServerUrl = true
            };

            return(linkManager.GetItemUrl(item, options));
        }
 public RedirectionService(
     IRedirectSearcher redirectSearcher,
     ISanitizer sanitizer,
     BaseLog logger,
     IUrlMapperContext context,
     BaseLinkManager linkManager,
     BaseMediaManager mediaManager)
 {
     this.redirectSearcher = redirectSearcher;
     this.sanitizer        = sanitizer;
     this.logger           = logger;
     this.context          = context;
     this.linkManager      = linkManager;
     this.mediaManager     = mediaManager;
 }
Exemple #16
0
 public EnterspeedConfigurationService(
     BaseSettings settings,
     BaseLanguageManager languageManager,
     BaseItemManager itemManager,
     BaseLinkManager linkManager,
     BaseFactory factory,
     BaseSiteContextFactory siteContextFactory)
 {
     _settings           = settings;
     _languageManager    = languageManager;
     _itemManager        = itemManager;
     _linkManager        = linkManager;
     _factory            = factory;
     _siteContextFactory = siteContextFactory;
 }
        public MultiLanguageService(
            ILog logger,
            IMvcContext mvcContext,
            BaseLanguageManager languageManager,
            BaseLinkManager linkManager)
        {
            Throw.IfNull(logger, nameof(logger));
            Throw.IfNull(mvcContext, nameof(mvcContext));
            Throw.IfNull(languageManager, nameof(languageManager));
            Throw.IfNull(linkManager, nameof(linkManager));

            _logger          = logger;
            _mvcContext      = mvcContext;
            _languageManager = languageManager;
            _linkManager     = linkManager;
        }
 public MetaBlogApi(
     IBlogManager blogManager,
     ICategoryManager categoryManager,
     IEntryManager entryManager,
     IWeBlogSettings settings,
     BaseMediaManager mediaManager,
     BaseLinkManager linkManager,
     IBlogSettingsResolver blogSettingsResolver)
 {
     BlogManager          = blogManager ?? ServiceLocator.ServiceProvider.GetRequiredService <IBlogManager>();
     CategoryManager      = categoryManager ?? ServiceLocator.ServiceProvider.GetRequiredService <ICategoryManager>();
     EntryManager         = entryManager ?? ServiceLocator.ServiceProvider.GetRequiredService <IEntryManager>();
     Settings             = settings ?? ServiceLocator.ServiceProvider.GetRequiredService <IWeBlogSettings>();
     MediaManager         = mediaManager ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseMediaManager>();
     LinkManager          = linkManager ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseLinkManager>();
     BlogSettingsResolver = blogSettingsResolver ?? ServiceLocator.ServiceProvider.GetRequiredService <IBlogSettingsResolver>();
 }
 public TestableMetaBlogApi(
     IBlogManager blogManager                   = null,
     ICategoryManager categoryManager           = null,
     IEntryManager entryManager                 = null,
     IWeBlogSettings settings                   = null,
     BaseMediaManager mediaManager              = null,
     BaseLinkManager linkManager                = null,
     IBlogSettingsResolver blogSettingsResolver = null
     )
     : base(
         blogManager ?? Mock.Of <IBlogManager>(),
         categoryManager ?? Mock.Of <ICategoryManager>(),
         entryManager ?? Mock.Of <IEntryManager>(),
         settings ?? Mock.Of <IWeBlogSettings>(),
         mediaManager ?? Mock.Of <BaseMediaManager>(),
         linkManager ?? Mock.Of <BaseLinkManager>(),
         blogSettingsResolver ?? Mock.Of <IBlogSettingsResolver>()
         )
 {
 }
Exemple #20
0
 public NavigationBuilder(BaseLinkManager linkManager)
 {
     this.linkManager = linkManager;
 }
 public Redirect404(BaseSiteManager baseSiteManager, BaseItemManager baseItemManager, BaseLinkManager baseLinkManager, ILogManager logManager)
     : base(baseSiteManager, baseItemManager)
 {
     _baseLinkManager = baseLinkManager;
     _logManager      = logManager;
 }
Exemple #22
0
 public BlogFacebookComments(BaseLinkManager linkManager)
 {
     _linkManager = linkManager;
 }
Exemple #23
0
 public LinkManagerService(BaseLinkManager fakeLinkManager)
 {
     _fakeLinkManager = fakeLinkManager;
 }
Exemple #24
0
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="settings">The settings to use. If null, the default settings are used.</param>
 public BlogManager(BaseLinkManager linkManager, BaseTemplateManager templateManager, IWeBlogSettings settings = null)
 {
     LinkManager     = linkManager ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseLinkManager>();
     TemplateManager = templateManager ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseTemplateManager>();
     Settings        = settings ?? WeBlogSettings.Instance;
 }
Exemple #25
0
 public BlogHomeItem(Item innerItem, BaseLinkManager linkManager, IWeBlogSettings settings = null)
     : base(innerItem)
 {
     Settings = settings;
 }
Exemple #26
0
 public BlogManager(BaseLinkManager linkManager, IWeBlogSettings settings = null)
     : this(linkManager, null, settings)
 {
 }
Exemple #27
0
 public FacebookLike(BaseLinkManager linkManager)
 {
     _linkManager = linkManager;
 }
Exemple #28
0
 public HandleNotFound(IErrorItemResolver errorItemResolver, BaseLinkManager linkManager, Func <HttpServerUtilityBase> httpServerThunk)
 {
     _errorItemResolver = errorItemResolver ?? throw new ArgumentNullException(nameof(errorItemResolver));
     _linkManager       = linkManager ?? throw new ArgumentNullException(nameof(linkManager));
     _httpServerThunk   = httpServerThunk ?? throw new ArgumentNullException(nameof(httpServerThunk));
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="baseSiteManager"></param>
 /// <param name="baseItemManager"></param>
 /// <param name="baseLinkManager"></param>
 public ItemNotfoundHandler(BaseSiteManager baseSiteManager, BaseItemManager baseItemManager, BaseLinkManager baseLinkManager) : base(baseSiteManager, baseItemManager)
 {
     _baseLinkManager = baseLinkManager;
 }
Exemple #30
0
 public LanguageRepository(SiteContext siteContext, BaseLinkManager linkManager)
 {
     this.SiteContext = siteContext;
     this.LinkManager = linkManager;
 }