示例#1
0
        public EmailNotificationMethod(
            ILocalizedTextService textService,
            IHostingEnvironment hostingEnvironment,
            IEmailSender emailSender,
            IOptionsMonitor <HealthChecksSettings> healthChecksSettings,
            IOptionsMonitor <ContentSettings> contentSettings,
            IMarkdownToHtmlConverter markdownToHtmlConverter)
            : base(healthChecksSettings)
        {
            var recipientEmail = Settings?["RecipientEmail"];

            if (string.IsNullOrWhiteSpace(recipientEmail))
            {
                Enabled = false;
                return;
            }

            RecipientEmail = recipientEmail;

            _textService             = textService ?? throw new ArgumentNullException(nameof(textService));
            _hostingEnvironment      = hostingEnvironment;
            _emailSender             = emailSender;
            _markdownToHtmlConverter = markdownToHtmlConverter;
            _contentSettings         = contentSettings.CurrentValue ?? throw new ArgumentNullException(nameof(contentSettings));

            contentSettings.OnChange(x => _contentSettings = x);
        }
示例#2
0
 public StaticTextManager(IDynamicTextService dynamicTextService, ILocalizationService localizationService,
                          IMarkdownToHtmlConverter markdownToHtmlConverter, DictionaryScopeResolver dictionaryScopeResolver)
 {
     m_dynamicTextService      = dynamicTextService;
     m_localizationService     = localizationService;
     m_markdownToHtmlConverter = markdownToHtmlConverter;
     m_dictionaryScopeResolver = dictionaryScopeResolver;
 }
示例#3
0
 public EditionNoteManager(ResourceRepository resourceRepository, FulltextStorageProvider fulltextStorageProvider,
                           AuthorizationManager authorizationManager, AuthenticationManager authenticationManager,
                           IMarkdownToHtmlConverter markdownConverter, IMapper mapper)
 {
     m_resourceRepository      = resourceRepository;
     m_fulltextStorageProvider = fulltextStorageProvider;
     m_authorizationManager    = authorizationManager;
     m_authenticationManager   = authenticationManager;
     m_markdownConverter       = markdownConverter;
     m_mapper = mapper;
 }
 public PostFileProcessor(IFileSystem fileSystem, IMarkdownToHtmlConverter markdownToHtmlConverter, ITemplateEngine templateEngine)
 {
     this.fileSystem = fileSystem;
     this.markdownToHtmlConverter = markdownToHtmlConverter;
     this.templateEngine          = templateEngine;
 }
示例#5
0
 public StaticTextManager(StaticTextRepository staticTextRepository, IMarkdownToHtmlConverter markdownToHtmlConverter)
 {
     m_staticTextRepository    = staticTextRepository;
     m_markdownToHtmlConverter = markdownToHtmlConverter;
 }
示例#6
0
 public TextController(ILocalizationService localizationService, StaticTextManager staticTextManager, ControllerDataProvider controllerDataProvider, IMarkdownToHtmlConverter markdownToHtmlConverter) : base(controllerDataProvider)
 {
     m_localizationService     = localizationService;
     m_staticTextManager       = staticTextManager;
     m_markdownToHtmlConverter = markdownToHtmlConverter;
 }
示例#7
0
 public TextController(StaticTextManager staticTextManager, CommunicationProvider communicationProvider, IMarkdownToHtmlConverter markdownToHtmlConverter) : base(communicationProvider)
 {
     m_staticTextManager       = staticTextManager;
     m_markdownToHtmlConverter = markdownToHtmlConverter;
 }
示例#8
0
 public TextConverter(IMarkdownToHtmlConverter markdownToHtmlConverter)
 {
     m_markdownToHtmlConverter = markdownToHtmlConverter;
 }
 public MarkdownToPlainTextConverter(IMarkdownToHtmlConverter markdownToHtmlConverter, IHtmlToPlainTextConverter htmlToPlainTextConverter)
 {
     m_markdownToHtmlConverter  = markdownToHtmlConverter;
     m_htmlToPlainTextConverter = htmlToPlainTextConverter;
 }