/// <summary> /// Initializes a new instance of the <see cref="PublishService"/> class. /// </summary> /// <param name="settings"><see cref="WebAppSettings"/> instance.</param> /// <param name="markdownHelper"><see cref="IMarkdownHelper"/> instance.</param> /// <param name="fileHelper"><see cref="IFileHelper"/> instance.</param> /// <param name="httpClientHelper"><see cref="IHttpClientHelper"/> instance.</param> public PublishService(WebAppSettings settings, IMarkdownHelper markdownHelper, IFileHelper fileHelper, IHttpClientHelper httpClientHelper) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } this._settings = settings; if (markdownHelper == null) { throw new ArgumentNullException(nameof(markdownHelper)); } this._markdownHelper = markdownHelper; if (fileHelper == null) { throw new ArgumentNullException(nameof(fileHelper)); } this._fileHelper = fileHelper; if (httpClientHelper == null) { throw new ArgumentNullException(nameof(httpClientHelper)); } this._httpClientHelper = httpClientHelper; }
/// <summary> /// Initializes a new instance of the <see cref="PostController"/> class. /// </summary> /// <param name="settings"><see cref="WebAppSettings"/> instance.</param> /// <param name="markdownHelper"><see cref="IMarkdownHelper"/> instance.</param> /// <param name="themeService"><see cref="IThemeService"/> instance.</param> /// <param name="publishService"><see cref="IPublishService"/> instance.</param> public PostController(WebAppSettings settings, IMarkdownHelper markdownHelper, IThemeService themeService, IPublishService publishService) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } this._settings = settings; if (markdownHelper == null) { throw new ArgumentNullException(nameof(markdownHelper)); } this._markdownHelper = markdownHelper; if (themeService == null) { throw new ArgumentNullException(nameof(themeService)); } this._themeService = themeService; if (publishService == null) { throw new ArgumentNullException(nameof(publishService)); } this._publishService = publishService; }
/// <summary> /// Initializes a new instance of the <see cref="FileHelper"/> class. /// </summary> /// <param name="settings"><see cref="WebAppSettings"/> instance.</param> public FileHelper(WebAppSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } this._settings = settings; }
/// <summary> /// Initializes a new instance of the <see cref="ThemeService"/> class. /// </summary> /// <param name="settings"><see cref="WebAppSettings"/> instance.</param> public ThemeService(WebAppSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } this._settings = settings; this._controllers = new Dictionary<string, List<string>> { { "Post", new List<string>() { "Preview", "PublishHtml" } }, }; }
/// <summary> /// Initializes a new instance of the <see cref="ThemeLoader"/> class. /// </summary> /// <param name="settings"><see cref="WebAppSettings"/> instance.</param> /// <param name="fileHelper"><see cref="IFileHelper"/> instance.</param> public ThemeLoader(WebAppSettings settings, IFileHelper fileHelper) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } this._settings = settings; if (fileHelper == null) { throw new ArgumentNullException(nameof(fileHelper)); } this._fileHelper = fileHelper; }