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) => { } }); }
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 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>())); }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="currentBlog">The blog being listed.</param> /// <param name="settings">The settings to use. If null, the default settings will be used.</param> /// <param name="authorsCore">The <see cref="IAuthorsCore"/> component to use to retrieve author information.</param> /// <param name="entryManager">The <see cref="IEntryManager"/> to use to access entries.</param> /// <param name="templateManager">The <see cref="BaseTemplateManager"/> to use to access templates.</param> public PostListCore(BlogHomeItem currentBlog, IWeBlogSettings settings = null, IAuthorsCore authorsCore = null, IEntryManager entryManager = null, BaseTemplateManager templateManager = null) { CurrentBlog = currentBlog; Settings = settings ?? WeBlogSettings.Instance; AuthorsCore = authorsCore ?? new AuthorsCore(CurrentBlog); EntryManager = entryManager ?? ManagerFactory.EntryManagerInstance; TemplateManager = templateManager ?? ServiceLocator.ServiceProvider.GetService(typeof(BaseTemplateManager)) as BaseTemplateManager; }
public FeedResolver(BaseTemplateManager templateManager, IWeBlogSettings weBlogSettings) { Assert.ArgumentNotNull(templateManager, nameof(templateManager)); Assert.ArgumentNotNull(weBlogSettings, nameof(weBlogSettings)); TemplateManager = templateManager; WeBlogSettings = weBlogSettings; }
public EntryManager( ReportDataProviderBase reportDataProvider, IEntrySearchCache cache, IWeBlogSettings settings = null, ICommentManager commentManager = null) : this(reportDataProvider, cache, settings, commentManager, null) { }
public MetaBlogApi( IBlogManager blogManager, ICategoryManager categoryManager, IEntryManager entryManager, IWeBlogSettings settings, BaseMediaManager mediaManager, BaseLinkManager linkManager) { }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="settings">The settings to use, or pass null to use the default settings.</param> /// <param name="templateManager">The <see cref="BaseTemplateManager"/> used to access templates.</param> /// <param name="blogSettingsResolver">The resolver used to resolve settings for specific blogs.</param> /// <param name="eventQueue">The event queue to submit new comments to.</param> public CommentManager( IWeBlogSettings settings = null, IWeBlogCommentSettings commentSettings = null, BaseTemplateManager templateManager = null, IBlogSettingsResolver blogSettingsResolver = null, BaseEventQueueProvider eventQueue = null) { Settings = settings ?? WeBlogSettings.Instance; CommentSettings = commentSettings ?? ServiceLocator.ServiceProvider.GetRequiredService <IWeBlogCommentSettings>(); TemplateManager = templateManager ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseTemplateManager>(); BlogSettingsResolver = blogSettingsResolver ?? ServiceLocator.ServiceProvider.GetRequiredService <IBlogSettingsResolver>(); EventQueue = eventQueue ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseEventQueueProvider>(); }
public EntryManager( ReportDataProviderBase reportDataProvider, IEntrySearchCache cache, IWeBlogSettings settings = null, ICommentManager commentManager = null, BaseTemplateManager templateManager = null, IBlogSettingsResolver blogSettingsResolver = null) { ReportDataProvider = reportDataProvider; Settings = settings ?? WeBlogSettings.Instance; EntryCache = cache ?? CacheManager.GetCache <IEntrySearchCache>(EntrySearchCache.CacheName); CommentManager = commentManager ?? ServiceLocator.ServiceProvider.GetRequiredService <ICommentManager>(); TemplateManager = templateManager ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseTemplateManager>(); BlogSettingsResolver = blogSettingsResolver ?? ServiceLocator.ServiceProvider.GetRequiredService <IBlogSettingsResolver>(); }
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>() ) { }
public WorkflowSubmit(IWeBlogSettings settings, IWeBlogCommentSettings commentSettings) { _settings = settings; _commentSettings = commentSettings ?? ServiceLocator.ServiceProvider.GetRequiredService <IWeBlogCommentSettings>(); }
public BlogHomeItem(Item innerItem, IWeBlogSettings settings = null) : base(innerItem) { Settings = settings; }
public BlogHomeItem(Item innerItem, BaseLinkManager linkManager, IWeBlogSettings settings = null) : base(innerItem) { Settings = settings; }
/// <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; }
public EntryManager(ReportDataProviderBase reportDataProvider, IWeBlogSettings settings) { ReportDataProvider = reportDataProvider; Settings = settings ?? new WeBlogSettings(); }
public BlogManager(IWeBlogSettings settings = null) : this(null, null, settings) { }
public BlogManager(BaseLinkManager linkManager, IWeBlogSettings settings = null) : this(linkManager, null, settings) { }
public EntryManager(IWeBlogSettings settings) { Settings = settings ?? new WeBlogSettings(); }
public TranslatorCache(string cacheName, IWeBlogSettings settings = null) { CacheNamePrefix = cacheName; _settings = settings ?? WeBlogSettings.Instance; }
public ShareEntryShareThis(IWeBlogSettings settings) { _settings = settings; }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="settings">The settings to use. If null, the default settings are used.</param> /// <param name="templateManager">The <see cref="BaseTemplateManager"/> used to access templates.</param> public CategoryManager(IWeBlogSettings settings = null, BaseTemplateManager templateManager = null) { Settings = settings ?? WeBlogSettings.Instance; TemplateManager = templateManager ?? ServiceLocator.ServiceProvider.GetService(typeof(BaseTemplateManager)) as BaseTemplateManager; }
public CommentManager(IWeBlogSettings settings = null) : this(settings, null) { }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="settings">The settings to use, or pass null to use the default settings.</param> public CommentManager([CanBeNull] IWeBlogSettings settings = null) { Settings = settings ?? new WeBlogSettings(); }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="settings">The settings to use. If null, the default settings will be used.</param> public BlogManager(IWeBlogSettings settings = null) { Settings = settings ?? new WeBlogSettings(); }
public WorkflowSubmit(IWeBlogSettings settings) { _settings = settings; }
public CategoryManager(IWeBlogSettings settings = null) : this(settings, null) { }
public ItemAndPublishEventHandler(IWeBlogSettings settings, BaseTemplateManager templateManager) { _settings = settings ?? WeBlogSettings.Instance; _templateManager = templateManager ?? ServiceLocator.ServiceProvider.GetRequiredService <BaseTemplateManager>(); }
public CommentsListCore(BlogHomeItem currentBlogHomeItem, EntryItem currentEntry, IWeBlogSettings settings = null, ICommentManager commentManager = null) { CurrentBlog = currentBlogHomeItem; CurrentEntry = currentEntry; Settings = settings ?? WeBlogSettings.Instance; CommentManager = commentManager ?? ManagerFactory.CommentManagerInstance; }
public Captcha(IWeBlogSettings settings) { Settings = settings; }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="settings">The settings to use. If null, the default settings are used.</param> public CategoryManager(IWeBlogSettings settings = null) { Settings = settings ?? new WeBlogSettings(); }