public static void ExportHtmlToClipboard(string markdown, IMarkdownConverter converter) { var text = RemoveYamlFrontMatter(markdown); var html = converter.ConvertToHtml(text, false); Clipboard.SetText(html); }
public Pager(ILogger <Pager> logger, IMarkdownConverter markdownConverter, ICacheManager cacheManager, IPageIOManager pageIOManager) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (markdownConverter == null) { throw new ArgumentNullException(nameof(markdownConverter)); } if (cacheManager == null) { throw new ArgumentNullException(nameof(cacheManager)); } if (pageIOManager == null) { throw new ArgumentNullException(nameof(pageIOManager)); } _logger = logger; _markdownConverter = markdownConverter; _cacheManager = cacheManager; _pageIOManager = pageIOManager; }
public CommentEmailNotificationService(IUnitOfWork2 uow, IUserService userService, ICommentService commentService, IMailTemplate mailTemplate, IMailingService mailingService, IApplicationSettings appSettings, IOrganizationService organizationService, IMarkdownConverter markdownConverter, IPostService postService, ILogger logger) { _appSettings = appSettings; _userService = userService; _commentService = commentService; _mailTemplate = mailTemplate; _mailingService = mailingService; _organizationService = organizationService; _markdownConverter = markdownConverter; _postService = postService; _logger = logger; _eventsDbSet = uow.GetDbSet <Event>(); _projectsDbSet = uow.GetDbSet <Project>(); _commentsDbSet = uow.GetDbSet <Comment>(); }
public IndexModel(IBlogAppService blogAppService, IPostAppService postAppService, ITagAppService tagAppService, IBlogManager blogManager, IGitlabClientAppService gitlabClientAppService, IMarkdownConverter markdownConverter) { _blogAppService = blogAppService; _postAppService = postAppService; _tagAppService = tagAppService; _blogManager = blogManager; _gitlabClientAppService = gitlabClientAppService; _markdownConverter = markdownConverter; }
public void InitializeTest() { // Use actual serializer and markdown implementations for the tests. this.serializer = new JsonSerializer(); this.markdownConverter = new MarkdownConverter(); // Mock the file system and PDF calls. this.pdfGeneratorMock = new Mock <IPdfGenerator>(); this.fileSystemMock = new Mock <IFileSystem>(); }
/// <summary> /// Initializes a new instance of the <see cref="ResumeController"/> class. /// </summary> /// <param name="serializer">The serializer to load the resume data with.</param> /// <param name="markdownConverter">Handles converting Markdown.</param> /// <param name="pdfGenerator">PDF document generator.</param> /// <param name="fileSystem">Used to read and save documents from the file system.</param> public ResumeController( ISerializer serializer, IMarkdownConverter markdownConverter, IPdfGenerator pdfGenerator, IFileSystem fileSystem) { this.serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); this.markdownConverter = markdownConverter ?? throw new ArgumentNullException(nameof(markdownConverter)); this.pdfGenerator = pdfGenerator ?? throw new ArgumentNullException(nameof(pdfGenerator)); this.fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem)); }
public PortalBlogAppService(IGitlabClientAppService gitlabClientAppService, IMarkdownConverter markdownConverter, IPostAppService postAppService, IAppConfigurationAccessor appConfiguration, IPostManager postManager, ITagManager tagManager, BlogManager blogManager, IRepository <PostTag> postTagRepository) { _gitlabClientAppService = gitlabClientAppService; _markdownConverter = markdownConverter; _postAppService = postAppService; _appConfiguration = appConfiguration; _postManager = postManager; _tagManager = tagManager; _blogManager = blogManager; _postTagRepository = postTagRepository; }
public MainWindow(IMarkdownConverter markdownConverter, ISpellCheckProvider spellCheckProvider, FindReplaceDialog findReplaceDialog) { InitializeComponent(); MarkdownConverter = markdownConverter; SpellCheckProvider = spellCheckProvider; FindReplaceDialog = findReplaceDialog; Loaded += OnLoaded; Closing += OnClosing; SizeChanged += (s, e) => CalculateEditorMargins(); Editor.PropertyChanged += EditorOnPropertyChanged; Editor.TextChanged += (s, e) => Preview.UpdatePreview(Editor.Text); Editor.ScrollChanged += (s, e) => Preview.SetScrollOffset(e); }
public MarkdownFileProcessingStrategy( IMarkdownFileParser markdownFileParser, IMarkdownConverter markdownConverter, IHtmlFileWriter fileWriter, ISiteTemplateFiller templateFiller, CliOptions options, IFileSystem fileSystem ) { this.markdownFileParser = markdownFileParser; this.markdownConverter = markdownConverter; this.fileWriter = fileWriter; this.templateFiller = templateFiller; this.options = options; this.fileSystem = fileSystem; }
public MainWindow( IMarkdownConverter markdownConverter, ISpellCheckProvider spellCheckProvider, ISnippetManager snippetManager) { DataContext = this; InitializeComponent(); MarkdownConverter = markdownConverter; SpellCheckProvider = spellCheckProvider; SnippetManager = snippetManager; Closing += OnClosing; Activated += OnActivated; IsVisibleChanged += OnIsVisibleChanged; Editor.PropertyChanged += EditorOnPropertyChanged; Editor.TextChanged += (s, e) => Preview.UpdatePreview(((Editor)s)); Editor.ScrollChanged += (s, e) => Preview.SetScrollOffset(e); }
public CommentNotificationService( IUnitOfWork2 uow, IUserService userService, IMailTemplate mailTemplate, IMailingService mailingService, IApplicationSettings appSettings, IOrganizationService organizationService, IMarkdownConverter markdownConverter) { _appSettings = appSettings; _userService = userService; _mailTemplate = mailTemplate; _mailingService = mailingService; _organizationService = organizationService; _markdownConverter = markdownConverter; _eventsDbSet = uow.GetDbSet <EntityModels.Models.Events.Event>(); _projectsDbSet = uow.GetDbSet <Project>(); }
public EventService(IUnitOfWork2 uow, IPermissionService permissionService, IEventUtilitiesService eventUtilitiesService, IEventValidationService eventValidationService, IEventParticipationService eventParticipationService, IWallService wallService, IMarkdownConverter markdownConverter) { _uow = uow; _eventsDbSet = uow.GetDbSet <Event>(); _eventTypesDbSet = uow.GetDbSet <EventType>(); _usersDbSet = uow.GetDbSet <ApplicationUser>(); _eventOptionsDbSet = uow.GetDbSet <EventOption>(); _officeDbSet = uow.GetDbSet <Office>(); _permissionService = permissionService; _eventUtilitiesService = eventUtilitiesService; _eventValidationService = eventValidationService; _eventParticipationService = eventParticipationService; _wallService = wallService; _markdownConverter = markdownConverter; }
public PostNotificationService(IUnitOfWork2 uow, IUserService userService, IPostService postService, IMailTemplate mailTemplate, IMailingService mailingService, IApplicationSettings appSettings, IOrganizationService organizationService, IMarkdownConverter markdownConverter, ILogger logger) { _appSettings = appSettings; _userService = userService; _postService = postService; _mailTemplate = mailTemplate; _mailingService = mailingService; _organizationService = organizationService; _markdownConverter = markdownConverter; _logger = logger; _wallsDbSet = uow.GetDbSet <DataLayer.EntityModels.Models.Multiwall.Wall>(); _eventsDbSet = uow.GetDbSet <Event>(); _projectsDbSet = uow.GetDbSet <Project>(); }
public void Setup() { _categoryMapper = MockRepository.GenerateStub<IMapper<Category, CategoryViewModel>>(); _markdownConverter = MockRepository.GenerateStub<IMarkdownConverter>(); }
public PostConverter(IMarkdownConverter markdownConverter, ITemplateEngine templateEngine) { this.markdownConverter = markdownConverter; this.templateEngine = templateEngine; }
public MarkdownPostData(IMarkdownGetter markdownGetter, IMarkdownConverter markdownConverter) { _markdownGetter = markdownGetter; _markdownConverter = markdownConverter; }
public PostRepository(IGitRepository gitRepository, IMarkdownConverter converter) { this.gitRepository = gitRepository; this.converter = converter; }
public MarkdownDocumentToHtmlConverter(IMarkdownConverter markdownConverter, IOptions <DocsUiOptions> urlOptions) { _markdownConverter = markdownConverter; _uiOptions = urlOptions.Value; }
public MarkdownDocumentToHtmlConverter(IMarkdownConverter markdownConverter) { _markdownConverter = markdownConverter; }