diff --git a/src/app/JR.Cms.WebUI/JR.Cms.WebUI.csproj b/src/app/JR.Cms.WebUI/JR.Cms.WebUI.csproj index a2bbf7b4c..fca6255ce 100644 --- a/src/app/JR.Cms.WebUI/JR.Cms.WebUI.csproj +++ b/src/app/JR.Cms.WebUI/JR.Cms.WebUI.csproj @@ -692,42 +692,10 @@ - - {d40b1fb7-00f9-4d07-b034-eb51ab99e447} - JR.Cms.CacheService - {c3841a42-df60-43bb-bc3c-03185cf0216d} JR.Cms.Core - - {28221385-8873-45f3-afd6-611dfd041bec} - JR.Cms.Infrastructure - - - {940d0f3b-b28a-4759-b9ae-3c54aac4036d} - JR.Cms.WebImpl - - - {39bcb411-39ca-4635-9c9b-f9fbae40058e} - JR.Cms.BLL - - - {DB45CA62-9B89-4ABE-9ED2-54B45175D37B} - JR.Cms.Domain.Interface - - - {a925a0e7-22d6-4da7-8b75-87aa0d6d6e24} - JR.Cms.DataTransfer - - - {f512899c-b4c9-465f-a3db-8e511c92a8a8} - JR.Cms.ServiceContract - - - {477203f2-8a7f-4cea-b17e-21f8b35a8b22} - JR.Cms.Service - diff --git a/src/app/JR.Cms.WebUI/_Boot/CmsEventRegister.cs b/src/app/JR.Cms.WebUI/_Boot/CmsEventRegister.cs index 0ba981450..047856be5 100644 --- a/src/app/JR.Cms.WebUI/_Boot/CmsEventRegister.cs +++ b/src/app/JR.Cms.WebUI/_Boot/CmsEventRegister.cs @@ -10,8 +10,8 @@ */ using System.Linq; -using JR.Cms.CacheService; using JR.Cms.Conf; +using JR.Cms.Library.CacheService; using JR.Cms.WebImpl.Resource; namespace JR.Cms diff --git a/src/core/JR.Cms.Core/Cms.cs b/src/core/JR.Cms.Core/Cms.cs index 9b79fc4bf..4b755117f 100644 --- a/src/core/JR.Cms.Core/Cms.cs +++ b/src/core/JR.Cms.Core/Cms.cs @@ -15,15 +15,14 @@ using JR.Cms.Conf; using JR.Cms.Core; using JR.Cms.Core.Plugins; -using JR.Cms.Infrastructure; -using JR.Cms.DataTransfer; -using JR.DevFw.PluginKernel; -using JR.DevFw.Framework.Web.UI; using JR.Cms.DB; +using JR.Cms.Infrastructure; using JR.Cms.Library.CacheProvider; using JR.Cms.Library.CacheProvider.CacheCompoment; +using JR.Cms.ServiceDto; using JR.DevFw.Framework.IO; -using SiteDto = JR.Cms.ServiceDto.SiteDto; +using JR.DevFw.Framework.Web.UI; +using JR.DevFw.PluginKernel; namespace JR.Cms { @@ -272,13 +271,13 @@ public static void Init(BootFlag flag, String confPath) //检查网站激活状态 //SoftwareActivator.VerifyActivation(); //如果不存在模板文件夹,则创建目录 - if (!Directory.Exists(Cms.PyhicPath + "templates/")) + if (!Directory.Exists(PyhicPath + "templates/")) { - Directory.CreateDirectory(Cms.PyhicPath + "templates/").Create(); + Directory.CreateDirectory(PyhicPath + "templates/").Create(); //暂时网络安装默认模板(后可使用资源代替) Updater.InstallTemplate("default", "tpl_default.zip"); } - _templateManager = new TemplateManager(Cms.PyhicPath + CmsVariables.TEMPLATE_PATH); + _templateManager = new TemplateManager(PyhicPath + CmsVariables.TEMPLATE_PATH); // 注册模板 Template.Register("/" + CmsVariables.TEMPLATE_PATH, true); @@ -288,7 +287,7 @@ public static void Init(BootFlag flag, String confPath) PluginConfig.PLUGIN_TMP_DIRECTORY = CmsVariables.TEMP_PATH + "plugin/"; PluginConfig.PLUGIN_LOG_OPENED = true; PluginConfig.PLUGIN_LOG_EXCEPT_FORMAT = "** {time} **:{message}\r\nSource:{source}\r\nAddress:{addr}\r\nStack:{stack}\r\n\r\n"; - string pluginPhysicPath = Cms.PyhicPath + PluginConfig.PLUGIN_TMP_DIRECTORY; + string pluginPhysicPath = PyhicPath + PluginConfig.PLUGIN_TMP_DIRECTORY; if (!Directory.Exists(pluginPhysicPath)) { Directory.CreateDirectory(pluginPhysicPath).Create(); @@ -297,11 +296,11 @@ public static void Init(BootFlag flag, String confPath) CmsPluginContext.Connect(); // 设置验证码字体 - VerifyCodeGenerator.SetFontFamily(Cms.PyhicPath + CmsVariables.FRAMEWORK_ASSETS_PATH + "fonts/comic.ttf"); + VerifyCodeGenerator.SetFontFamily(PyhicPath + CmsVariables.FRAMEWORK_ASSETS_PATH + "fonts/comic.ttf"); } if (OnInit != null) { - Cms.OnInit(); + OnInit(); } IsInitFinish = true; @@ -315,7 +314,7 @@ private static void CopyOEMToRoot(string dir) { try { - IOUtils.CopyFolder(Cms.PyhicPath + "/" + CmsVariables.OEM_PATH + dir, Cms.PyhicPath); + IOUtils.CopyFolder(PyhicPath + "/" + CmsVariables.OEM_PATH + dir, PyhicPath); } catch (Exception ex) { @@ -326,7 +325,7 @@ private static void CopyOEMToRoot(string dir) private static void InitKvDb() { //注册KvDB - string kvDir = Cms.PyhicPath + CmsVariables.TEMP_PATH + "data/gcp"; + string kvDir = PyhicPath + CmsVariables.TEMP_PATH + "data/gcp"; if (Directory.Exists(kvDir)) { try @@ -386,7 +385,7 @@ private static void LoadOtherConfig() /// public static void RegSites(SiteDto[] sites) { - Cms._sites = sites; + _sites = sites; } @@ -410,7 +409,7 @@ private static void ChkCreate(string path) private static void resetTempFiles() { - DirectoryInfo dir = new DirectoryInfo(Cms.PyhicPath + CmsVariables.TEMP_PATH); + DirectoryInfo dir = new DirectoryInfo(PyhicPath + CmsVariables.TEMP_PATH); if (dir.Exists) { foreach (FileInfo file in dir.GetFiles()) diff --git a/src/core/JR.Cms.Core/Core/Interface/ICmsPageGenerator.cs b/src/core/JR.Cms.Core/Core/Interface/ICmsPageGenerator.cs index e9a34a501..dee6a8187 100644 --- a/src/core/JR.Cms.Core/Core/Interface/ICmsPageGenerator.cs +++ b/src/core/JR.Cms.Core/Core/Interface/ICmsPageGenerator.cs @@ -8,9 +8,7 @@ * */ -using JR.Cms.DataTransfer; -using ArchiveDto = JR.Cms.ServiceDto.ArchiveDto; -using CategoryDto = JR.Cms.ServiceDto.CategoryDto; +using JR.Cms.ServiceDto; namespace JR.Cms.Core.Interface { diff --git a/src/core/JR.Cms.Core/Infrastructure/Properties/AssemblyInfo.cs b/src/core/JR.Cms.Core/Infrastructure/Properties/AssemblyInfo.cs deleted file mode 100644 index e8c04e484..000000000 --- a/src/core/JR.Cms.Core/Infrastructure/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的常规信息通过以下 -// 特性集控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("JR.Cms.Infrastructure")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("JR.Cms.Infrastructure")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 使此程序集中的类型 -// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, -// 则将该类型上的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("10a05aa9-f836-42b9-92bb-99338319bafb")] - -// 程序集的版本信息由下面四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/core/JR.Cms.Core/Infrastructure/x86/leveldb.dll b/src/core/JR.Cms.Core/Infrastructure/x86/leveldb.dll deleted file mode 100644 index 6a72573e8..000000000 Binary files a/src/core/JR.Cms.Core/Infrastructure/x86/leveldb.dll and /dev/null differ diff --git a/src/core/JR.Cms.Core/JR.Cms.Core.csproj b/src/core/JR.Cms.Core/JR.Cms.Core.csproj index b14badac1..3a1554429 100644 --- a/src/core/JR.Cms.Core/JR.Cms.Core.csproj +++ b/src/core/JR.Cms.Core/JR.Cms.Core.csproj @@ -237,7 +237,6 @@ - @@ -430,13 +429,6 @@ - - - - - - - @@ -485,9 +477,6 @@ true - - - diff --git a/src/core/JR.Cms.Core/WebImpl/PageGenerateObject.cs b/src/core/JR.Cms.Core/WebImpl/PageGenerateObject.cs index e911e5933..2966e37ff 100644 --- a/src/core/JR.Cms.Core/WebImpl/PageGenerateObject.cs +++ b/src/core/JR.Cms.Core/WebImpl/PageGenerateObject.cs @@ -11,7 +11,6 @@ using System.Web; using JR.Cms.Core; using JR.Cms.Core.Interface; -using JR.Cms.DataTransfer; using JR.Cms.Domain.Interface.Common.Language; using JR.Cms.Domain.Interface.Enum; using JR.Cms.Domain.Interface.Models; diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/BasePage.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/BasePage.cs index 5835009ce..729530eac 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/BasePage.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/BasePage.cs @@ -21,11 +21,10 @@ using System.Text.RegularExpressions; using System.Web; using JR.Cms.Conf; -using JR.Cms.DataTransfer; +using JR.Cms.ServiceDto; using JR.Cms.WebImpl.Json; using JR.DevFw; using JR.DevFw.Framework.Extensions; -using SiteDto = JR.Cms.ServiceDto.SiteDto; namespace JR.Cms.WebImpl.WebManager { diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/CmsWebMaster.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/CmsWebMaster.cs index 4652f3024..b3bfaeaab 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/CmsWebMaster.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/CmsWebMaster.cs @@ -2,12 +2,10 @@ using System.Web; using JR.Cms.CacheService; using JR.Cms.Conf; -using JR.Cms.DataTransfer; using JR.Cms.Library.CacheService; using JR.Cms.Library.Utility; +using JR.Cms.ServiceDto; using JR.DevFw.Web; -using SiteDto = JR.Cms.ServiceDto.SiteDto; -using UserDto = JR.Cms.ServiceDto.UserDto; namespace JR.Cms.WebImpl.WebManager { @@ -88,7 +86,7 @@ private static SiteDto GetSiteFromCookie(HttpContext context, SiteDto site) public static void SetCurrentManageSite(HttpContext context, SiteDto value) { - HttpCookie cookie = context.Request.Cookies.Get(CmsWebMaster.CookieNameKey); + HttpCookie cookie = context.Request.Cookies.Get(CookieNameKey); if (cookie != null) { if (value.SiteId <= 0) @@ -106,7 +104,7 @@ public static void SetCurrentManageSite(HttpContext context, SiteDto value) } else { - cookie = new HttpCookie(CmsWebMaster.CookieNameKey, value.SiteId.ToString()) + cookie = new HttpCookie(CookieNameKey, value.SiteId.ToString()) { Expires = DateTime.Now.AddDays(2), Path = "/" + Settings.SYS_ADMIN_TAG @@ -114,7 +112,7 @@ public static void SetCurrentManageSite(HttpContext context, SiteDto value) context.Response.Cookies.Add(cookie); } - context.Session[CmsWebMaster.CurrentSiteSessionStr] = null; + context.Session[CurrentSiteSessionStr] = null; } } } diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/AjaxC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/AjaxC.cs index a613d678c..b83d40bde 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/AjaxC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/AjaxC.cs @@ -17,6 +17,7 @@ using System.Collections; using System.Collections.Generic; using System.Globalization; +using System.IO; using System.Linq; using System.Text; using System.Threading; @@ -24,19 +25,15 @@ using System.Xml; using JR.Cms.CacheService; using JR.Cms.Conf; -using JR.Cms.DataTransfer; using JR.Cms.Domain.Interface.Models; using JR.Cms.Infrastructure.Tree; using JR.Cms.Library.CacheProvider; using JR.Cms.Library.DataAccess.BLL; using JR.Cms.Library.Utility; +using JR.Cms.ServiceDto; using JR.Cms.WebImpl.Json; using JR.DevFw.Framework.Text; using static JR.Cms.Updater; -using ArchiveDto = JR.Cms.ServiceDto.ArchiveDto; -using CategoryDto = JR.Cms.ServiceDto.CategoryDto; -using SiteDto = JR.Cms.ServiceDto.SiteDto; -using UserDto = JR.Cms.ServiceDto.UserDto; namespace JR.Cms.WebImpl.WebManager.Handle { @@ -180,7 +177,7 @@ private static string GetMenuJsonFromFile(bool isMaster, int siteId) //读取配置 string setfile = String.Format("{0}config/sysset.conf", AppDomain.CurrentDomain.BaseDirectory); - if (global::System.IO.File.Exists(setfile)) + if (File.Exists(setfile)) { xd.Load(setfile); } @@ -319,7 +316,7 @@ public void CheckUpgrade_GET() string message = "未知异常"; - VersionInfo result = Updater.CheckUpgrade(); + VersionInfo result = CheckUpgrade(); switch (result.FetchCode) { @@ -350,7 +347,7 @@ public void GetUpgrade_POST() { if (Cms.OfficialEnvironment) { - Updater.StartUpgrade(); + StartUpgrade(); } } @@ -359,19 +356,19 @@ public void GetUpgrade_POST() /// public void GetUpgradeStatus_GET() { - float f = Updater.UpgradePercent; + float f = UpgradePercent; base.Response.Write(f.ToString(CultureInfo.InvariantCulture)); if (f == 1F) { - Updater.ApplyBinFolder(); + ApplyBinFolder(); } else if (f < 1F) { - Updater.UpgradePercent += (float)new Random().Next(1, 3) / 100; - if (Updater.UpgradePercent > 0.96F) + UpgradePercent += (float)new Random().Next(1, 3) / 100; + if (UpgradePercent > 0.96F) { - Updater.UpgradePercent = 0.96F; + UpgradePercent = 0.96F; } } } diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ArchiveC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ArchiveC.cs index de0478e0b..b2f58f7c7 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ArchiveC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ArchiveC.cs @@ -22,7 +22,6 @@ using JR.Cms.CacheService; using JR.Cms.Conf; using JR.Cms.Core; -using JR.Cms.DataTransfer; using JR.Cms.Domain.Interface.Content.Archive; using JR.Cms.Domain.Interface.Enum; using JR.Cms.Domain.Interface.Models; @@ -30,14 +29,12 @@ using JR.Cms.Infrastructure; using JR.Cms.Library.DataAccess.BLL; using JR.Cms.Library.Utility; +using JR.Cms.ServiceDto; using JR.DevFw.Framework; using JR.DevFw.Toolkit.Tags; using JR.DevFw.Web; -using ArchiveDto = JR.Cms.ServiceDto.ArchiveDto; -using CategoryDto = JR.Cms.ServiceDto.CategoryDto; using JsonSerializer = JR.Cms.WebImpl.Json.JsonSerializer; using Result = JR.Cms.ServiceDto.Result; -using UserDto = JR.Cms.ServiceDto.UserDto; namespace JR.Cms.WebImpl.WebManager.Handle { @@ -323,7 +320,7 @@ public void Update_GET() }; base.RenderTemplate( - BasePage.CompressHtml(ResourceMap.GetPageContent(ManagementPage.Archive_Update)), + CompressHtml(ResourceMap.GetPageContent(ManagementPage.Archive_Update)), data); } diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/AssistantC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/AssistantC.cs index df05f7df2..915bc7395 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/AssistantC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/AssistantC.cs @@ -2,14 +2,14 @@ using System.Collections.Generic; using System.IO; using System.Text; +using System.Threading; using System.Web; using JR.Cms.CacheService; using JR.Cms.Conf; -using JR.Cms.DataTransfer; using JR.Cms.Library.CacheService; +using JR.Cms.ServiceDto; using SharpCompress.Archive; using SharpCompress.Common; -using SiteDto = JR.Cms.ServiceDto.SiteDto; namespace JR.Cms.WebImpl.WebManager.Handle { @@ -229,7 +229,7 @@ public void Local_patch_POST() //bool result=ZipUtility.UncompressFile(@"C:\", filePath, true); try { - System.Threading.Thread.Sleep(1000); + Thread.Sleep(1000); #region dotnetzip /* @@ -265,7 +265,7 @@ public void Local_patch_POST() } - catch (System.Exception ex1) + catch (Exception ex1) { base.Response.Write(ex1.Message); } diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/CategoryC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/CategoryC.cs index 9057c0e4c..a7762e952 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/CategoryC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/CategoryC.cs @@ -20,12 +20,12 @@ using System.Web; using JR.Cms.CacheService; using JR.Cms.Core; -using JR.Cms.DataTransfer; +using JR.Cms.Infrastructure; using JR.Cms.Infrastructure.Tree; +using JR.Cms.Library.CacheProvider.CacheCompoment; +using JR.Cms.ServiceDto; using JR.Cms.WebImpl.Json; -using CategoryDto = JR.Cms.ServiceDto.CategoryDto; -using Result = JR.Cms.ServiceDto.Result; -using SiteDto = JR.Cms.ServiceDto.SiteDto; +using Kvdb = JR.Cms.CacheService.Kvdb; namespace JR.Cms.WebImpl.WebManager.Handle { @@ -317,7 +317,7 @@ public string Update_POST() public string Delete_POST() { int categoryId = int.Parse(base.Request.Form["category_id"]); - JR.Cms.Infrastructure.Error err = ServiceCall.Instance.SiteService.DeleteCategory(this.SiteId, categoryId); + Error err = ServiceCall.Instance.SiteService.DeleteCategory(this.SiteId, categoryId); if (err == null) { String key = Consts.NODE_TREE_JSON_KEY + ":" + this.SiteId.ToString(); diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ExtendC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ExtendC.cs index 6e89da65a..edb1d68c9 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ExtendC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ExtendC.cs @@ -2,15 +2,12 @@ using System.Collections.Generic; using System.Linq; using JR.Cms.CacheService; -using JR.Cms.DataTransfer; using JR.Cms.Domain.Interface.Site.Extend; using JR.Cms.Library.CacheService; +using JR.Cms.ServiceDto; using JR.Cms.WebImpl.Json; using JR.DevFw.Framework.Automation; using JR.DevFw.Framework.Extensions; -using CategoryDto = JR.Cms.ServiceDto.CategoryDto; -using ExtendFieldDto = JR.Cms.ServiceDto.ExtendFieldDto; -using Result = JR.Cms.ServiceDto.Result; namespace JR.Cms.WebImpl.WebManager.Handle { diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/FileC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/FileC.cs index 938906365..acae17fc6 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/FileC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/FileC.cs @@ -219,13 +219,13 @@ public void EditFile_POST() if (!Directory.Exists(backupDir)) { Directory.CreateDirectory(backupDir).Create(); - global::System.IO.File.SetAttributes(backupDir, FileAttributes.Hidden); + File.SetAttributes(backupDir, FileAttributes.Hidden); } else { - if (System.IO.File.Exists(backFile)) + if (File.Exists(backFile)) { - global::System.IO.File.Delete(backFile); + File.Delete(backFile); } } //生成备份文件 @@ -255,7 +255,7 @@ public void EditFile_POST() tmpfile.MoveTo(backFile); //global::System.IO.File.SetAttributes(_fpath + ".bak",file.Attributes & FileAttributes.Hidden); - global::System.IO.File.SetAttributes(_fpath, file.Attributes & FileAttributes.Normal); + File.SetAttributes(_fpath, file.Attributes & FileAttributes.Normal); } Response.Write("还原成功!"); } diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/LinkC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/LinkC.cs index c09db1820..c4cb81f01 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/LinkC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/LinkC.cs @@ -18,16 +18,12 @@ using System.Text.RegularExpressions; using System.Web; using JR.Cms.CacheService; -using JR.Cms.DataTransfer; using JR.Cms.Domain.Interface.Content; using JR.Cms.Domain.Interface.Site.Link; +using JR.Cms.Library.CacheProvider.CacheCompoment; +using JR.Cms.ServiceDto; using JR.Cms.WebImpl.Json; using JR.DevFw.Web; -using ArchiveDto = JR.Cms.ServiceDto.ArchiveDto; -using CategoryDto = JR.Cms.ServiceDto.CategoryDto; -using LinkBehavior = JR.Cms.ServiceDto.LinkBehavior; -using RelatedLinkDto = JR.Cms.ServiceDto.RelatedLinkDto; -using SiteLinkDto = JR.Cms.ServiceDto.SiteLinkDto; namespace JR.Cms.WebImpl.WebManager.Handle { diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ResourceC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ResourceC.cs index 96fa19770..36d40f14b 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ResourceC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/ResourceC.cs @@ -205,15 +205,15 @@ public void Combine_GET() foreach (string file in files) { - if (System.IO.File.Exists(appDir + file)) + if (File.Exists(appDir + file)) { if (compress && (type == "js" || type == "css")) { - context.Response.Write(BasePage.CompressHtml(System.IO.File.ReadAllText(appDir + file))); + context.Response.Write(BasePage.CompressHtml(File.ReadAllText(appDir + file))); } else { - context.Response.BinaryWrite(System.IO.File.ReadAllBytes(appDir + file)); + context.Response.BinaryWrite(File.ReadAllBytes(appDir + file)); } } } diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/SiteC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/SiteC.cs index 9bb3a75cf..a34013646 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/SiteC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/SiteC.cs @@ -17,10 +17,10 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using JR.Cms.CacheService; -using JR.Cms.DataTransfer; +using JR.Cms.Library.CacheProvider.CacheCompoment; using JR.Cms.Library.CacheService; +using JR.Cms.ServiceDto; using JR.DevFw.Framework.Automation; -using SiteDto = JR.Cms.ServiceDto.SiteDto; namespace JR.Cms.WebImpl.WebManager.Handle { diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/SystemC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/SystemC.cs index ea700249d..6b4f3af7f 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/SystemC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/SystemC.cs @@ -19,16 +19,14 @@ using System.IO; using System.Text; using System.Web; -using JR.Cms.CacheService; using JR.Cms.Conf; using JR.Cms.Core; -using JR.Cms.DataTransfer; using JR.Cms.Library.CacheService; +using JR.Cms.Library.Utility; +using JR.Cms.ServiceDto; using JR.Cms.WebImpl.Json; using JR.Cms.WebImpl.PageModels; using JR.DevFw.Framework.Web.UI; -using SiteDto = JR.Cms.ServiceDto.SiteDto; -using UserDto = JR.Cms.ServiceDto.UserDto; namespace JR.Cms.WebImpl.WebManager.Handle { diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/TemplateC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/TemplateC.cs index e813fed7e..8612b8a53 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/TemplateC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/TemplateC.cs @@ -18,12 +18,12 @@ using System.Text.RegularExpressions; using JR.Cms.CacheService; using JR.Cms.Core; -using JR.Cms.DataTransfer; +using JR.Cms.Library.Utility; +using JR.Cms.ServiceDto; using JR.DevFw.Framework; using Newtonsoft.Json; using SharpCompress.Archive; using SharpCompress.Common; -using SiteDto = JR.Cms.ServiceDto.SiteDto; namespace JR.Cms.WebImpl.WebManager.Handle { @@ -144,7 +144,7 @@ public string EditFile_GET() ViewData["file"] = path; ViewData["path"] = path; - return base.RequireTemplate(BasePage.CompressHtml(ResourceMap.GetPageContent(ManagementPage.Template_EditFile))); + return base.RequireTemplate(CompressHtml(ResourceMap.GetPageContent(ManagementPage.Template_EditFile))); } public void EditFile_POST() { @@ -493,7 +493,7 @@ public void UploadInstall_POST() { dirIndex++; string dirName = entry.FilePath.Split('\\', '/')[0]; - if (global::System.IO.Directory.Exists(tplRootPath + dirName)) + if (Directory.Exists(tplRootPath + dirName)) { resultMessage = "模板已经存在!"; goto handleOver; @@ -520,7 +520,7 @@ public void UploadInstall_POST() handleOver: archive.Dispose(); - global::System.IO.File.Delete(tempTplPath); + File.Delete(tempTplPath); //重新注册模板 Cms.Template.Register(); diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/UploadC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/UploadC.cs index 225f4edd6..b41c14271 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/UploadC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/UploadC.cs @@ -15,6 +15,8 @@ using System.Collections.Generic; using System.IO; using System.Net; +using System.Text; +using System.Web; using JR.Cms.WebImpl.Util; using JR.DevFw.Framework.Web.UI; @@ -110,7 +112,7 @@ public void UploadFile_POST() /// POST参数 /// cookie /// 远程服务器响应字符串 - public void HttpPostFile(string url, System.Web.HttpPostedFile postedFile, Dictionary parameters, CookieContainer cookieContainer, ref string output) + public void HttpPostFile(string url, HttpPostedFile postedFile, Dictionary parameters, CookieContainer cookieContainer, ref string output) { //1>创建请求 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); @@ -122,7 +124,7 @@ public void HttpPostFile(string url, System.Web.HttpPostedFile postedFile, Dicti request.KeepAlive = true; string boundary = "----------------------------" + DateTime.Now.Ticks.ToString("x");//分界线 - byte[] boundaryBytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n"); + byte[] boundaryBytes = Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n"); request.ContentType = "multipart/form-data; boundary=" + boundary; ;//内容类型 @@ -137,7 +139,7 @@ public void HttpPostFile(string url, System.Web.HttpPostedFile postedFile, Dicti string strHeader = "Content-Disposition:application/x-www-form-urlencoded; name=\"{0}\";filename=\"{1}\"\r\nContent-Type:{2}\r\n\r\n"; strHeader = string.Format(strHeader, "filedata", postedFile.FileName, postedFile.ContentType); //6>HTTP请求头 - byte[] byteHeader = System.Text.ASCIIEncoding.ASCII.GetBytes(strHeader); + byte[] byteHeader = ASCIIEncoding.ASCII.GetBytes(strHeader); try { using (Stream stream = request.GetRequestStream()) @@ -148,7 +150,7 @@ public void HttpPostFile(string url, System.Web.HttpPostedFile postedFile, Dicti foreach (KeyValuePair item in parameters) { stream.Write(boundaryBytes, 0, boundaryBytes.Length);//写入分界线 - byte[] formBytes = System.Text.Encoding.UTF8.GetBytes(string.Format(formdataTemplate, item.Key, item.Value)); + byte[] formBytes = Encoding.UTF8.GetBytes(string.Format(formdataTemplate, item.Key, item.Value)); stream.Write(formBytes, 0, formBytes.Length); } } @@ -159,7 +161,7 @@ public void HttpPostFile(string url, System.Web.HttpPostedFile postedFile, Dicti //6.2>把文件流写入请求流 stream.Write(buffer, 0, buffer.Length); //6.3>写入分隔流 - byte[] trailer = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary + "--\r\n"); + byte[] trailer = Encoding.ASCII.GetBytes("\r\n--" + boundary + "--\r\n"); stream.Write(trailer, 0, trailer.Length); //6.4>关闭流 stream.Close(); diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/UserC.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/UserC.cs index fc1b1160e..78d077f7d 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/UserC.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/Handle/UserC.cs @@ -18,18 +18,16 @@ using System.Text.RegularExpressions; using System.Web; using JR.Cms.CacheService; -using JR.Cms.DataTransfer; using JR.Cms.Domain.Interface.Models; using JR.Cms.Domain.Interface.User; using JR.Cms.Domain.Interface.Value; using JR.Cms.Infrastructure.Domain; using JR.Cms.Library.DataAccess.BLL; +using JR.Cms.Library.Utility; using JR.Cms.ServiceContract; +using JR.Cms.ServiceDto; using JR.Cms.WebImpl.Json; using JR.DevFw.Framework.Extensions; -using SiteDto = JR.Cms.ServiceDto.SiteDto; -using UserDto = JR.Cms.ServiceDto.UserDto; -using UserFormObject = JR.Cms.ServiceDto.UserFormObject; namespace JR.Cms.WebImpl.WebManager.Handle { diff --git a/src/core/JR.Cms.Core/WebImpl/WebManager/ManagerLogic.cs b/src/core/JR.Cms.Core/WebImpl/WebManager/ManagerLogic.cs index 52f8c4c45..eb013b954 100644 --- a/src/core/JR.Cms.Core/WebImpl/WebManager/ManagerLogic.cs +++ b/src/core/JR.Cms.Core/WebImpl/WebManager/ManagerLogic.cs @@ -16,7 +16,6 @@ using System.Reflection; using System.Text.RegularExpressions; using System.Web; -using JR.Cms.DataTransfer; using JR.Cms.Library.CacheProvider.CacheCompoment; using JR.Cms.Library.Utility; using JR.Cms.old; diff --git a/src/unit_test/JR.Cms.UnitTest/ArchiveTest.cs b/src/unit_test/JR.Cms.UnitTest/ArchiveTest.cs index 0a5be64a0..e467e9013 100644 --- a/src/unit_test/JR.Cms.UnitTest/ArchiveTest.cs +++ b/src/unit_test/JR.Cms.UnitTest/ArchiveTest.cs @@ -2,12 +2,12 @@ using JR.DevFw.Framework; using Microsoft.VisualStudio.TestTools.UnitTesting; using JR.Cms.CacheService; -using JR.Cms.DataTransfer; using JR.Cms.Domain.Interface.Content.Archive; using JR.Cms.Domain.Interface.Site.Category; using JR.Cms.Infrastructure; using JR.Cms.Infrastructure.Ioc; using JR.Cms.Models; +using JR.Cms.ServiceDto; namespace JR.Cms.UnitTest { diff --git a/src/unit_test/JR.Cms.UnitTest/ExtendTest.cs b/src/unit_test/JR.Cms.UnitTest/ExtendTest.cs index f547a728f..0c83baa05 100644 --- a/src/unit_test/JR.Cms.UnitTest/ExtendTest.cs +++ b/src/unit_test/JR.Cms.UnitTest/ExtendTest.cs @@ -1,12 +1,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using JR.Cms.CacheService; -using JR.Cms.DataTransfer; using JR.Cms.Domain.Interface.Site.Extend; +using JR.Cms.ServiceDto; namespace JR.Cms.UnitTest { diff --git a/src/unit_test/JR.Cms.UnitTest/JR.Cms.UnitTest.csproj b/src/unit_test/JR.Cms.UnitTest/JR.Cms.UnitTest.csproj index fd005ac99..a9690da46 100644 --- a/src/unit_test/JR.Cms.UnitTest/JR.Cms.UnitTest.csproj +++ b/src/unit_test/JR.Cms.UnitTest/JR.Cms.UnitTest.csproj @@ -78,42 +78,10 @@ - - {d40b1fb7-00f9-4d07-b034-eb51ab99e447} - JR.Cms.CacheService - - - {f8362c26-b7f2-4a9c-aa1c-d2c943ea8621} - JR.Cms.Cache - {c3841a42-df60-43bb-bc3c-03185cf0216d} JR.Cms.Core - - {28221385-8873-45f3-afd6-611dfd041bec} - JR.Cms.Infrastructure - - - {DB45CA62-9B89-4ABE-9ED2-54B45175D37B} - JR.Cms.Domain.Interface - - - {A925A0E7-22D6-4DA7-8B75-87AA0D6D6E24} - JR.Cms.DataTransfer - - - {F512899C-B4C9-465F-A3DB-8E511C92A8A8} - JR.Cms.ServiceContract - - - {1B43FBD5-8E31-4688-9B25-A63378D375F2} - JR.Cms.ServiceUtil - - - {477203F2-8A7F-4CEA-B17E-21F8B35A8B22} - JR.Cms.Service - diff --git a/src/unit_test/JR.Cms.UnitTest/SiteTest.cs b/src/unit_test/JR.Cms.UnitTest/SiteTest.cs index 95f4a423a..8e2d4bf71 100644 --- a/src/unit_test/JR.Cms.UnitTest/SiteTest.cs +++ b/src/unit_test/JR.Cms.UnitTest/SiteTest.cs @@ -1,9 +1,9 @@ using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using JR.Cms.CacheService; -using JR.Cms.DataTransfer; using JR.Cms.Domain.Interface.Site; using JR.Cms.Infrastructure.Ioc; +using JR.Cms.ServiceDto; namespace JR.Cms.UnitTest { diff --git a/src/unit_test/JR.Cms.UnitTest/TestBase.cs b/src/unit_test/JR.Cms.UnitTest/TestBase.cs index 05afe6c2e..097acdd79 100644 --- a/src/unit_test/JR.Cms.UnitTest/TestBase.cs +++ b/src/unit_test/JR.Cms.UnitTest/TestBase.cs @@ -6,6 +6,7 @@ using System.Text; using System.Threading.Tasks; using JR.Cms.CacheService; +using JR.Cms.Library.CacheService; using JR.Cms.ServiceImpl; namespace JR.Cms.UnitTest