コード例 #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);
        }
コード例 #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;
        }
コード例 #3
0
 public SiteSecurityConfigFileService(IOptions <ConfigFilePathsDataOption> optionsAccessor)
 {
     options = optionsAccessor.Value;
 }
コード例 #4
0
ファイル: UserDataRepo.cs プロジェクト: xingx001/dasblog-core
 public UserDataRepo(IOptions <ConfigFilePathsDataOption> optionsAccessor)
 {
     options = optionsAccessor.Value;
 }
コード例 #5
0
 public DasBlogHealthChecks(IDasBlogSettings dasBlogSettings, IOptions <ConfigFilePathsDataOption> fileConfigOption)
 {
     this.dasBlogSettings  = dasBlogSettings;
     this.fileConfigOption = fileConfigOption.Value;
 }