コード例 #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>();
 }
コード例 #2
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;
 }
コード例 #3
0
 public AkismetSpamCheck(IWeBlogSettings settings, IBlogManager blogManager, IAkismet akismetApi, BaseLinkManager linkManager)
     : this(commentSettings : null, blogManager : null, akismetApi : null, linkManager : null)
 {
 }