src/ZKEACMS/Theme/ThemeService.cs

(开头部分) 10KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/* http://www.zkea.net/ 
 * Copyright (c) ZKEASOFT. All rights reserved. 
 * http://www.zkea.net/licenses */

using System.Collections.Generic;
using System.Linq;
using Easy.Extend;
using Easy.RepositoryPattern;
using Easy.Mvc;
using Easy.Mvc.ValueProvider;
using Easy;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Concurrent;
using Microsoft.AspNetCore.Hosting;
using System.IO;
using Easy.Cache;
using Easy.Constant;
using ZKEACMS;
using System.Text;
using Microsoft.Extensions.Logging;
using System.Data;
using ZKEACMS.Setting;
using System.Data.Common;

namespace ZKEACMS.Theme
{
    public class ThemeService : ServiceBase<ThemeEntity, CMSDbContext>, IThemeService
    {
        class FilePathMap
        {
            public string Source { get; set; }
            public string FilePath { get; set; }
        }

        private readonly ICookie _cookie;
        private const string PreViewCookieName = "PreViewTheme";
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly IWebHostEnvironment _hostingEnvironment;
        private readonly IApplicationSettingService _applicationSettingService;
        private readonly ConcurrentDictionary<string, object> _cache;
        private readonly ConcurrentDictionary<string, object> _versionMap;
        private const string CurrentThemeCacheKey = "CurrentThemeCacheKey";
        private const string CurrentThemeVersionMapCacheKey = "CurrentThemeVersionMapCacheKey";

        private readonly string _themeName = "themes";
        private readonly string _sqlName = "sql";
        private readonly string _sql = "*.sql";

        private readonly ILogger<ThemeService> _logger;
        private readonly ICacheManager<IEnumerable<ThemeEntity>> _cacheMgr;
        private const string AllThemeCacheKey = "AllThemeCacheKey";
        public ThemeService(ICookie cookie,
            ILogger<ThemeService> logger,
            IHttpContextAccessor httpContextAccessor,
            IWebHostEnvironment hostingEnvironment,
            IApplicationContext applicationContext,
            IApplicationSettingService applicationSettingService,
            ICacheManager<ConcurrentDictionary<string, object>> cacheManager,
后面还有 208 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。