src/ZKEACMS/Page/PageService.cs
(开头部分) 15KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* http://www.zkea.net/
* Copyright (c) ZKEASOFT. All rights reserved.
* http://www.zkea.net/licenses */
using Easy;
using Easy.Extend;
using Easy.RepositoryPattern;
using Easy.Serializer;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using ZKEACMS.Event;
using ZKEACMS.Extend;
using ZKEACMS.Layout;
using ZKEACMS.Widget;
using ZKEACMS.Zone;
namespace ZKEACMS.Page
{
public class PageService : ServiceBase<PageEntity, CMSDbContext>, IPageService
{
private readonly IWidgetBasePartService _widgetService;
private readonly IWidgetActivator _widgetActivator;
private readonly IZoneService _zoneService;
private readonly ILayoutHtmlService _layoutHtmlService;
private readonly IEventManager _eventManager;
private readonly ILocalize _localize;
private Dictionary<string, IEnumerable<PageEntity>> _cachedPage;
public PageService(IWidgetBasePartService widgetService,
IApplicationContext applicationContext,
IWidgetActivator widgetActivator,
IZoneService zoneService,
ILayoutHtmlService layoutHtmlService,
ILocalize localize,
CMSDbContext dbContext,
IEventManager eventManager)
: base(applicationContext, dbContext)
{
_widgetService = widgetService;
_widgetActivator = widgetActivator;
_zoneService = zoneService;
_layoutHtmlService = layoutHtmlService;
_eventManager = eventManager;
_localize = localize;
_cachedPage = new Dictionary<string, IEnumerable<PageEntity>>(StringComparer.OrdinalIgnoreCase);
}
private string FormatPath(string path)
{
if (path != "/" && path.EndsWith("/"))
{
path = path.Substring(0, path.Length - 1);
}
if (path == "/")
{
path = "~/index";
}
后面还有 364 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。