Exemplo n.º 1
0
        public FileSystemBinaryManager(IDasBlogSettings dasBlogSettings, IConfigFileService <MetaTags> metaTagFileService,
                                       IConfigFileService <SiteConfig> siteConfigFileService, IOptions <ConfigFilePathsDataOption> optionsAccessor)
        {
            this.dasBlogSettings       = dasBlogSettings;
            this.metaTagFileService    = metaTagFileService;
            this.siteConfigFileService = siteConfigFileService;
            options          = optionsAccessor.Value;
            contentBinaryUrl = dasBlogSettings.RelativeToRoot(options.BinaryUrlRelative);

            var physBinaryPathUrl = new Uri(contentBinaryUrl);

            var loggingDataService = LoggingDataServiceFactory.GetService(Path.Combine(dasBlogSettings.WebRootDirectory, dasBlogSettings.SiteConfiguration.LogDir));

            this.binaryDataService = BinaryDataServiceFactory.GetService(options.BinaryFolder, physBinaryPathUrl, loggingDataService);
        }
Exemplo n.º 2
0
        public DasBlogSettings(IWebHostEnvironment env, IOptionsMonitor <SiteConfig> siteConfig, IOptionsMonitor <MetaTags> metaTagsConfig,
                               ISiteSecurityConfig siteSecurityConfig, IOptions <ConfigFilePathsDataOption> optionsAccessor)
        {
            WebRootDirectory  = env.ContentRootPath;
            SiteConfiguration = siteConfig.CurrentValue;

            SecurityConfiguration = siteSecurityConfig;
            MetaTags            = metaTagsConfig.CurrentValue;
            filePathDataOptions = optionsAccessor.Value;

            RssUrl          = RelativeToRoot("feed/rss");
            PingBackUrl     = RelativeToRoot("feed/pingback");
            CategoryUrl     = RelativeToRoot("category");
            ArchiveUrl      = RelativeToRoot("archive");
            MicroSummaryUrl = RelativeToRoot("site/microsummary");
            RsdUrl          = RelativeToRoot("feed/rsd");
            ShortCutIconUrl = RelativeToRoot(string.Format("theme/{0}/favicon.ico", SiteConfiguration.Theme));
            ThemeCssUrl     = RelativeToRoot(string.Format("theme/{0}/custom.css", SiteConfiguration.Theme));

            siteSecurityConfigFilePath = filePathDataOptions.SecurityConfigFilePath;
        }
 public SiteSecurityConfigFileService(IOptions <ConfigFilePathsDataOption> optionsAccessor)
 {
     options = optionsAccessor.Value;
 }
Exemplo n.º 4
0
 public UserDataRepo(IOptions <ConfigFilePathsDataOption> optionsAccessor)
 {
     options = optionsAccessor.Value;
 }
Exemplo n.º 5
0
 public DasBlogHealthChecks(IDasBlogSettings dasBlogSettings, IOptions <ConfigFilePathsDataOption> fileConfigOption)
 {
     this.dasBlogSettings  = dasBlogSettings;
     this.fileConfigOption = fileConfigOption.Value;
 }