├── .gitignore ├── .travis.yml ├── LICENSE.txt ├── README.md ├── ReleaseNotes ├── ReleaseNote.0.9.5.md ├── ReleaseNote.0.9.6.md ├── ReleaseNote.0.9.7.md ├── ReleaseNote.0.9.8.md ├── ReleaseNote.1.0.0-beta-1.md ├── ReleaseNote.1.0.0-beta-2~3.md ├── ReleaseNote.1.0.0-beta-4.md ├── ReleaseNote.1.0.0-beta-5.md ├── ReleaseNote.1.0.0-final.md ├── ReleaseNote.1.0.0-rc-1.md ├── ReleaseNote.1.0.0-rc-2.md ├── ReleaseNote.1.0.0-rc-3.md ├── ReleaseNote.1.0.1.md ├── ReleaseNote.1.1.md ├── ReleaseNote.1.2.md ├── ReleaseNote.1.3.md ├── ReleaseNote.1.4.md ├── ReleaseNote.1.5.1.md ├── ReleaseNote.1.5.2.md ├── ReleaseNote.1.5.3.md ├── ReleaseNote.1.5.md ├── ReleaseNote.1.6.md ├── ReleaseNote.1.7.md ├── ReleaseNote.1.8.md ├── ReleaseNote.1.9.1.md ├── ReleaseNote.1.9.md ├── ReleaseNote.2.0.md ├── ReleaseNote.2.1.1.md ├── ReleaseNote.2.1.md ├── ReleaseNote.2.2.1.md ├── ReleaseNote.2.2.md ├── ReleaseNote.3.0.0.md ├── Roadmap.md └── imgs.0.9.8 │ ├── aspnet.dep.jpg │ ├── aspnet.depstd.jpg │ ├── aspnetcore.dep.jpg │ └── aspnetcore.depstd.jpg ├── Tools ├── ProjectCreator.Cmd.NetCore │ ├── Mono.Options.dll │ ├── Newtonsoft.Json.dll │ ├── ZKWeb.Toolkits.ProjectCreator.Cmd.deps.json │ ├── ZKWeb.Toolkits.ProjectCreator.Cmd.dll │ ├── ZKWeb.Toolkits.ProjectCreator.Cmd.runtimeconfig.json │ ├── ZKWeb.Toolkits.ProjectCreator.dll │ └── zh-CN │ │ ├── ZKWeb.Toolkits.ProjectCreator.Cmd.resources.dll │ │ └── ZKWeb.Toolkits.ProjectCreator.resources.dll ├── ProjectCreator.Cmd.Windows │ ├── Mono.Options.dll │ ├── Newtonsoft.Json.dll │ ├── ZKWeb.Toolkits.ProjectCreator.Cmd.exe │ ├── ZKWeb.Toolkits.ProjectCreator.Cmd.exe.config │ ├── ZKWeb.Toolkits.ProjectCreator.dll │ └── zh-CN │ │ ├── ZKWeb.Toolkits.ProjectCreator.Cmd.resources.dll │ │ └── ZKWeb.Toolkits.ProjectCreator.resources.dll ├── ProjectCreator.Gui.Windows │ ├── Google.ProtocolBuffers.Serialization.dll │ ├── Google.ProtocolBuffers.dll │ ├── Microsoft.Data.Sqlite.dll │ ├── MongoDB.Bson.dll │ ├── MongoDB.Driver.Core.dll │ ├── MongoDB.Driver.dll │ ├── MySql.Data.dll │ ├── Newtonsoft.Json.dll │ ├── Npgsql.dll │ ├── ZKWeb.Toolkits.ProjectCreator.Gui.exe │ ├── ZKWeb.Toolkits.ProjectCreator.Gui.exe.config │ ├── ZKWeb.Toolkits.ProjectCreator.dll │ ├── x86 │ │ └── sqlite3.dll │ ├── zh-CN │ │ ├── ZKWeb.Toolkits.ProjectCreator.Gui.resources.dll │ │ └── ZKWeb.Toolkits.ProjectCreator.resources.dll │ └── zh-Hans │ │ └── ZKWeb.Toolkits.ProjectCreator.Gui.resources.dll ├── README.md ├── Templates │ ├── AspNet.Dapper │ │ ├── .gitignore │ │ ├── __ProjectName__.AspNet │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Global.asax │ │ │ ├── Global.asax.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── __ProjectName__.AspNet.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Console │ │ │ ├── App.config │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Console.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Plugins.csproj │ │ │ ├── app.config │ │ │ └── packages.config │ │ └── __ProjectName__.sln │ ├── AspNet.EFCore │ │ ├── .gitignore │ │ ├── __ProjectName__.AspNet │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Global.asax │ │ │ ├── Global.asax.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── __ProjectName__.AspNet.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Console │ │ │ ├── App.config │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Console.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Plugins.csproj │ │ │ ├── app.config │ │ │ └── packages.config │ │ └── __ProjectName__.sln │ ├── AspNet.MongoDB │ │ ├── .gitignore │ │ ├── __ProjectName__.AspNet │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Global.asax │ │ │ ├── Global.asax.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── __ProjectName__.AspNet.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Console │ │ │ ├── App.config │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Console.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Plugins.csproj │ │ │ ├── app.config │ │ │ └── packages.config │ │ └── __ProjectName__.sln │ ├── AspNet.NHibernate │ │ ├── .gitignore │ │ ├── __ProjectName__.AspNet │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Global.asax │ │ │ ├── Global.asax.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── __ProjectName__.AspNet.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Console │ │ │ ├── App.config │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Console.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Plugins.csproj │ │ │ ├── app.config │ │ │ └── packages.config │ │ └── __ProjectName__.sln │ ├── AspNetCore.Dapper │ │ ├── .gitignore │ │ ├── __ProjectName__.sln │ │ └── src │ │ │ ├── __ProjectName__.AspNetCore │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── launchSettings.json │ │ │ ├── Startup.cs │ │ │ ├── __ProjectName__.AspNetCore.csproj │ │ │ ├── app.config │ │ │ └── web.config │ │ │ ├── __ProjectName__.Console │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ └── __ProjectName__.Console.csproj │ │ │ └── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ │ └── __ProjectName__.Plugins.csproj │ ├── AspNetCore.EFCore │ │ ├── .gitignore │ │ ├── __ProjectName__.sln │ │ └── src │ │ │ ├── __ProjectName__.AspNetCore │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── launchSettings.json │ │ │ ├── Startup.cs │ │ │ ├── __ProjectName__.AspNetCore.csproj │ │ │ ├── app.config │ │ │ └── web.config │ │ │ ├── __ProjectName__.Console │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ └── __ProjectName__.Console.csproj │ │ │ └── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ │ └── __ProjectName__.Plugins.csproj │ ├── AspNetCore.MongoDB │ │ ├── .gitignore │ │ ├── __ProjectName__.sln │ │ └── src │ │ │ ├── __ProjectName__.AspNetCore │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── launchSettings.json │ │ │ ├── Startup.cs │ │ │ ├── __ProjectName__.AspNetCore.csproj │ │ │ ├── app.config │ │ │ └── web.config │ │ │ ├── __ProjectName__.Console │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ └── __ProjectName__.Console.csproj │ │ │ └── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ │ └── __ProjectName__.Plugins.csproj │ ├── AspNetCore.NHibernate │ │ ├── .gitignore │ │ ├── __ProjectName__.sln │ │ └── src │ │ │ ├── __ProjectName__.AspNetCore │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── launchSettings.json │ │ │ ├── Startup.cs │ │ │ ├── __ProjectName__.AspNetCore.csproj │ │ │ ├── app.config │ │ │ └── web.config │ │ │ ├── __ProjectName__.Console │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ └── __ProjectName__.Console.csproj │ │ │ └── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ │ └── __ProjectName__.Plugins.csproj │ ├── BootstrapPlugin │ │ ├── plugin.json │ │ ├── src │ │ │ ├── Controllers │ │ │ │ └── HelloController.cs │ │ │ └── Plugin.cs │ │ ├── static │ │ │ ├── __ProjectName__.css │ │ │ │ └── hello.css │ │ │ └── __ProjectName__.js │ │ │ │ └── hello.js │ │ └── templates │ │ │ └── __ProjectName__ │ │ │ └── hello.html │ ├── Owin.Dapper │ │ ├── .gitignore │ │ ├── __ProjectName__.Console │ │ │ ├── App.config │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Console.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Owin │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Startup.cs │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── __ProjectName__.Owin.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Plugins.csproj │ │ │ ├── app.config │ │ │ └── packages.config │ │ └── __ProjectName__.sln │ ├── Owin.EFCore │ │ ├── .gitignore │ │ ├── __ProjectName__.Console │ │ │ ├── App.config │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Console.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Owin │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Startup.cs │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── __ProjectName__.Owin.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Plugins.csproj │ │ │ ├── app.config │ │ │ └── packages.config │ │ └── __ProjectName__.sln │ ├── Owin.MongoDB │ │ ├── .gitignore │ │ ├── __ProjectName__.Console │ │ │ ├── App.config │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Console.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Owin │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Startup.cs │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── __ProjectName__.Owin.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Plugins.csproj │ │ │ ├── app.config │ │ │ └── packages.config │ │ └── __ProjectName__.sln │ ├── Owin.NHibernate │ │ ├── .gitignore │ │ ├── __ProjectName__.Console │ │ │ ├── App.config │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Console.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Owin │ │ │ ├── App_Data │ │ │ │ ├── .gitignore │ │ │ │ └── config.json │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Startup.cs │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── __ProjectName__.Owin.csproj │ │ │ └── packages.config │ │ ├── __ProjectName__.Plugins │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── __ProjectName__.Plugins.csproj │ │ │ ├── app.config │ │ │ └── packages.config │ │ └── __ProjectName__.sln │ ├── build.bat │ ├── clean.bat │ └── replace_version.py ├── WebsitePublisher.Cmd.NetCore │ ├── Mono.Options.dll │ ├── Newtonsoft.Json.dll │ ├── ZKWeb.Toolkits.WebsitePublisher.Cmd.deps.json │ ├── ZKWeb.Toolkits.WebsitePublisher.Cmd.dll │ ├── ZKWeb.Toolkits.WebsitePublisher.Cmd.runtimeconfig.json │ ├── ZKWeb.Toolkits.WebsitePublisher.dll │ └── zh-CN │ │ ├── ZKWeb.Toolkits.WebsitePublisher.Cmd.resources.dll │ │ └── ZKWeb.Toolkits.WebsitePublisher.resources.dll ├── WebsitePublisher.Cmd.Windows │ ├── Mono.Options.dll │ ├── Newtonsoft.Json.dll │ ├── ZKWeb.Toolkits.WebsitePublisher.Cmd.exe │ ├── ZKWeb.Toolkits.WebsitePublisher.dll │ └── zh-CN │ │ ├── ZKWeb.Toolkits.WebsitePublisher.Cmd.resources.dll │ │ └── ZKWeb.Toolkits.WebsitePublisher.resources.dll ├── WebsitePublisher.Gui.Windows │ ├── Newtonsoft.Json.dll │ ├── ZKWeb.Toolkits.WebsitePublisher.Gui.exe │ ├── ZKWeb.Toolkits.WebsitePublisher.Gui.exe.config │ ├── ZKWeb.Toolkits.WebsitePublisher.dll │ ├── zh-CN │ │ ├── ZKWeb.Toolkits.WebsitePublisher.Gui.resources.dll │ │ └── ZKWeb.Toolkits.WebsitePublisher.resources.dll │ └── zh-Hans │ │ └── ZKWeb.Toolkits.WebsitePublisher.Gui.resources.dll └── project_creator.png ├── VERSION.txt ├── ZKWeb.Toolkits ├── ZKWeb.Toolkits.ProjectCreator.Cmd │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ └── Resources.zh-CN.resx │ └── ZKWeb.Toolkits.ProjectCreator.Cmd.csproj ├── ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui │ ├── .gitignore │ ├── DatabaseUtils │ │ ├── DatabaseUtils.cs │ │ ├── DatabaseUtils.csproj │ │ └── Program.cs │ ├── config │ │ ├── helpers.js │ │ ├── karma-dummy.js │ │ ├── karma-test-shim.js │ │ ├── karma.conf.js │ │ ├── webpack.common.js │ │ ├── webpack.dev.js │ │ ├── webpack.prod.js │ │ └── webpack.test.js │ ├── index.js │ ├── package.json │ ├── prebuild.js │ ├── publish.js │ ├── readme.md │ ├── src │ │ ├── app │ │ │ ├── CreateProjectParameters.ts │ │ │ ├── PluginCollection.ts │ │ │ ├── app.component.css │ │ │ ├── app.component.html │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ └── dataBaseConnection │ │ │ │ ├── baseConnection.ts │ │ │ │ ├── mongoConnection.ts │ │ │ │ ├── msSqlConnection.ts │ │ │ │ ├── mysqlConnection.ts │ │ │ │ ├── postgreSQLConnection.ts │ │ │ │ └── sqlLiteConnection.ts │ │ ├── assets │ │ │ ├── i18n │ │ │ │ ├── en-US.json │ │ │ │ └── zh-CN.json │ │ │ ├── icon.icns │ │ │ ├── icon.ico │ │ │ ├── images │ │ │ │ └── .gitkeep │ │ │ └── sass │ │ │ │ ├── _bootstrap-custom.scss │ │ │ │ ├── _bootstrap.scss │ │ │ │ └── style.scss │ │ ├── index.html │ │ ├── main.ts │ │ ├── polyfills.ts │ │ └── vendor.ts │ ├── tsconfig.json │ └── tslint.json ├── ZKWeb.Toolkits.ProjectCreator.Gui │ ├── App.config │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── MainForm.zh-Hans.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Resources.zh-CN.Designer.cs │ │ ├── Resources.zh-CN.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Utils │ │ └── DatabaseUtils.cs │ ├── ZKWeb.Toolkits.ProjectCreator.Gui.csproj │ ├── icon.ico │ └── packages.config ├── ZKWeb.Toolkits.ProjectCreator │ ├── Model │ │ ├── CreateProjectParameters.cs │ │ └── PluginCollection.cs │ ├── ProjectCreator.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ └── Resources.zh-CN.resx │ ├── Utils │ │ └── PathUtils.cs │ └── ZKWeb.Toolkits.ProjectCreator.csproj ├── ZKWeb.Toolkits.WebsitePublisher.Cmd │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ └── Resources.zh-CN.resx │ └── ZKWeb.Toolkits.WebsitePublisher.Cmd.csproj ├── ZKWeb.Toolkits.WebsitePublisher.Gui │ ├── App.config │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── MainForm.zh-Hans.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Resources.zh-CN.Designer.cs │ │ ├── Resources.zh-CN.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── ZKWeb.Toolkits.WebsitePublisher.Gui.csproj │ └── icon.ico ├── ZKWeb.Toolkits.WebsitePublisher │ ├── Model │ │ ├── PublishWebsiteParameters.cs │ │ └── WebsiteConfig.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ └── Resources.zh-CN.resx │ ├── Utils │ │ └── DirectoryUtils.cs │ ├── WebsitePublisher.cs │ └── ZKWeb.Toolkits.WebsitePublisher.csproj └── ZKWeb.Toolkits.sln ├── ZKWeb ├── NuGet.config ├── Tests.ZKWeb │ ├── ApplicationTest.cs │ ├── Cache │ │ ├── CacheIsolationPoliciesTest.cs │ │ └── IsolatedKeyValueCacheTest.cs │ ├── Database │ │ └── DatabaseContextTest.cs │ ├── Localize │ │ ├── TJsonConverterTest.cs │ │ └── TranslateManagerTest.cs │ ├── Logging │ │ └── LogManagerTest.cs │ ├── Serialize │ │ └── JsonNetTest.cs │ ├── Server │ │ └── WebsiteConfigManagerTest.cs │ ├── Storage │ │ ├── LocalFileStorageTest.cs │ │ ├── LocalPathManagerTest.cs │ │ └── TestDirectoryLayout.cs │ ├── Templating │ │ ├── DynamicContents │ │ │ ├── TemplateAreaExtensionsTest.cs │ │ │ ├── TemplateAreaManagerTest.cs │ │ │ ├── TemplateWidgetExtensionsTest.cs │ │ │ └── TemplateWidgetInfoExtensionsTest.cs │ │ ├── TemplateFileSystemTest.cs │ │ ├── TemplateFilters │ │ │ └── FiltersTest.cs │ │ ├── TemplateManagerTest.cs │ │ └── TemplateTags │ │ │ ├── AreaTest.cs │ │ │ ├── FetchTest.cs │ │ │ ├── HtmlLangTest.cs │ │ │ └── RawHtmlTest.cs │ ├── Tests.ZKWeb.csproj │ └── Web │ │ ├── ActionResults │ │ ├── FileEntryResultTest.cs │ │ ├── ImageResultTest.cs │ │ ├── JsonResultTest.cs │ │ ├── PlainResultTest.cs │ │ ├── RedirectResultTest.cs │ │ ├── StreamResultTest.cs │ │ └── TemplateResultTest.cs │ │ ├── ControllerManagerTest.cs │ │ └── HttpRequestHandlers │ │ ├── AddVersionHeaderHandlerTest.cs │ │ └── DefaultErrorHandlerTest.cs ├── Tests.ZKWebStandard │ ├── Collections │ │ ├── HierarchyDictionaryTest.cs │ │ ├── HtmlStringTest.cs │ │ ├── HttpContextCacheTest.cs │ │ ├── LazyCacheTest.cs │ │ ├── MemoryCacheTest.cs │ │ └── SimpleDisposableTest.cs │ ├── Extensions │ │ ├── ByteArrayExtensionsTest.cs │ │ ├── DateTimeExtensionsTest.cs │ │ ├── DecimalExtensionsTest.cs │ │ ├── EnumExtensionsTest.cs │ │ ├── ExceptionExtensionsTest.cs │ │ ├── ExpressionExtensionsTest.cs │ │ ├── IDictionaryExtensionsTest.cs │ │ ├── IEnumerableExtensionsTest.cs │ │ ├── IHttpContextExtensionsTest.cs │ │ ├── IHttpRequestExtensionsTest.cs │ │ ├── IHttpResponseExtensionsTest.cs │ │ ├── IListExtensions.cs │ │ ├── ISetExtensionsTest.cs │ │ ├── ITreeNodeExtensionsTest.cs │ │ ├── ImageExtensionsTest.cs │ │ ├── MemberInfoExtensionsTest.cs │ │ ├── MethodInfoExtensionsTest.cs │ │ ├── ObjectExtensionsTest.cs │ │ └── StreamExtensionTest.cs │ ├── Ioc │ │ ├── ContainerTest.cs │ │ └── ServiceProviderIntegrationTest.cs │ ├── Tests.ZKWebStandard.csproj │ ├── Utils │ │ ├── ExpressionUtilsTest.cs │ │ ├── FileUtilsTest.cs │ │ ├── GuidUtilsTest.cs │ │ ├── HttpUtilsTest.cs │ │ ├── LocaleUtilsTest.cs │ │ ├── MimeUtilsTest.cs │ │ ├── NetworkUtilsTest.cs │ │ ├── PasswordUtilsTest.cs │ │ ├── PathUtilsTest.cs │ │ ├── PlatformUtilsTest.cs │ │ ├── RandomUtilsTest.cs │ │ ├── ReflectionUtilsTest.cs │ │ ├── RegexUtilsTest.cs │ │ ├── SystemUtilsTest.cs │ │ └── TreeUtilsTest.cs │ └── Web │ │ └── HttpManagerTest.cs ├── ZKWeb.Console │ ├── App_Data │ │ ├── .gitignore │ │ └── config.json │ ├── IocContainerBenchmark.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ZKWeb.Console.csproj ├── ZKWeb.Hosting.AspNet │ ├── AspNetHttpContextWrapper.cs │ ├── AspNetHttpPostedFileWrapper.cs │ ├── AspNetHttpRequestWrapper.cs │ ├── AspNetHttpResponseWrapper.cs │ ├── AspNetWebsiteStopper.cs │ ├── GlobalBase.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ZKWeb.Hosting.AspNet.csproj ├── ZKWeb.Hosting.AspNetCore │ ├── CoreBuilderExtensions.cs │ ├── CoreHttpContextWrapper.cs │ ├── CoreHttpPostedFileWrapper.cs │ ├── CoreHttpRequestWrapper.cs │ ├── CoreHttpResponseEndException.cs │ ├── CoreHttpResponseWrapper.cs │ ├── CoreWebsiteStopper.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ServiceProviderProxy.cs │ ├── StartupBase.cs │ └── ZKWeb.Hosting.AspNetCore.csproj ├── ZKWeb.Hosting.Owin │ ├── OwinBuilderExtensions.cs │ ├── OwinHttpContextWrapper.cs │ ├── OwinHttpPostedFileWrapper.cs │ ├── OwinHttpRequestWrapper.cs │ ├── OwinHttpResponseEndException.cs │ ├── OwinHttpResponseWrapper.cs │ ├── OwinWebsiteStopper.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── StartupBase.cs │ └── ZKWeb.Hosting.Owin.csproj ├── ZKWeb.ORM.Dapper │ ├── DapperDatabaseContext.cs │ ├── DapperDatabaseContextFactory.cs │ ├── DapperEntityMappingBuilder.cs │ ├── DapperEntityMappings.cs │ ├── IDapperEntityMapping.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── PropertyResolver │ │ └── ZKWebPropertyResolver.cs │ ├── TypeHandlers │ │ ├── GuidTypeHandler.cs │ │ ├── JsonSerializedTypeHandler.cs │ │ └── TypeHandlerRegistrator.cs │ ├── Wrappers │ │ └── SameNameDbConnectionWrappers.cs │ └── ZKWeb.ORM.Dapper.csproj ├── ZKWeb.ORM.EFCore │ ├── EFCoreDatabaseContext.cs │ ├── EFCoreDatabaseContextBase.cs │ ├── EFCoreDatabaseContextFactory.cs │ ├── EFCoreDatabaseContextPool.cs │ ├── EFCoreEntityMappingBuilder.cs │ ├── EFCoreExtraConfigKeys.cs │ ├── EFCoreLoggerProvider.cs │ ├── EFCoreMigrationHistory.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ZKWeb.ORM.EFCore.csproj ├── ZKWeb.ORM.InMemory │ ├── IInMemoryEntityMapping.cs │ ├── InMemoryDatabaseContext.cs │ ├── InMemoryDatabaseContextFactory.cs │ ├── InMemoryDatabaseStore.cs │ ├── InMemoryEntityMappingBuilder.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ZKWeb.ORM.InMemory.csproj ├── ZKWeb.ORM.MongoDB │ ├── IMongoDBEntityMapping.cs │ ├── MongoDBDatabaseContext.cs │ ├── MongoDBDatabaseContextFactory.cs │ ├── MongoDBEntityMappingBuilder.cs │ ├── MongoDBEntityMappings.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ZKWeb.ORM.MongoDB.csproj ├── ZKWeb.ORM.NHibernate │ ├── BetterPostgreSQLConfiguration.cs │ ├── BetterPostgreSQLDialect.cs │ ├── NHibernateDatabaseContext.cs │ ├── NHibernateDatabaseContextFactory.cs │ ├── NHibernateEntityMappingBuilder.cs │ ├── NHibernateExtraConfigKeys.cs │ ├── NHibernateJsonSerializedType.cs │ ├── NHibernateLogInterceptor.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ZKWeb.ORM.NHibernate.csproj ├── ZKWeb.sln ├── ZKWeb │ ├── Application.cs │ ├── Cache │ │ ├── AutomaticCacheCleaner.cs │ │ ├── CacheFactory.cs │ │ ├── CacheFactoryOptions.cs │ │ ├── ICacheCleaner.cs │ │ ├── ICacheFactory.cs │ │ ├── ICacheIsolationPolicy.cs │ │ ├── IsolatedCacheKey.cs │ │ ├── IsolatedKeyValueCache.cs │ │ └── Policies │ │ │ ├── CacheIsolateByDevice.cs │ │ │ ├── CacheIsolateByLocale.cs │ │ │ └── CacheIsolateByUrl.cs │ ├── Database │ │ ├── DatabaseManager.cs │ │ ├── EntityMappingOptions.cs │ │ ├── IDatabaseCommandLogger.cs │ │ ├── IDatabaseContext.cs │ │ ├── IDatabaseContextFactory.cs │ │ ├── IDatabaseInitializeHandler.cs │ │ ├── IEntity.cs │ │ ├── IEntityMappingBuilder.cs │ │ ├── IEntityMappingProvider.cs │ │ ├── IEntityOperationHandler.cs │ │ └── Wrappers │ │ │ ├── DbCommandWrapper.cs │ │ │ └── DbConnectionWrapper.cs │ ├── Localize │ │ ├── ILanguage.cs │ │ ├── ITranslateProvider.cs │ │ ├── JsonConverters │ │ │ └── TJsonConverter.cs │ │ ├── T.cs │ │ └── TranslateManager.cs │ ├── Logging │ │ └── LogManager.cs │ ├── Obsoleted │ │ ├── ConfigManager.cs │ │ ├── FileResult.cs │ │ ├── IsolatedMemoryCache.cs │ │ ├── PathConfig.cs │ │ ├── PathManager.cs │ │ └── README.md │ ├── Plugin │ │ ├── AssemblyLoaders │ │ │ ├── AssemblyLoaderBase.cs │ │ │ ├── Core3AssemblyLoader.cs │ │ │ ├── IAssemblyLoader.cs │ │ │ └── NetAssemblyLoader.cs │ │ ├── CompilerServices │ │ │ ├── CompilationException.cs │ │ │ ├── CompilationOptions.cs │ │ │ ├── ICompilerService.cs │ │ │ └── RoslynCompilerService.cs │ │ ├── IPlugin.cs │ │ ├── PluginInfo.cs │ │ ├── PluginInfoExtensions.cs │ │ ├── PluginManager.cs │ │ └── PluginReloader.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Serialize │ │ └── JsonNetInitializer.cs │ ├── Server │ │ ├── DefaultApplication.cs │ │ ├── ExtraConfigKeys.cs │ │ ├── IApplication.cs │ │ ├── WebsiteConfig.cs │ │ └── WebsiteConfigManager.cs │ ├── Storage │ │ ├── IDirectoryEntry.cs │ │ ├── IFileEntry.cs │ │ ├── IFileEntryExtensions.cs │ │ ├── IFileStorage.cs │ │ ├── LocalDirectoryEntry.cs │ │ ├── LocalFileEntry.cs │ │ ├── LocalFileStorage.cs │ │ ├── LocalPathConfig.cs │ │ └── LocalPathManager.cs │ ├── Templating │ │ ├── DynamicContents │ │ │ ├── ITemplateWidgetRenderer.cs │ │ │ ├── TemplateArea.cs │ │ │ ├── TemplateAreaExtensions.cs │ │ │ ├── TemplateAreaManager.cs │ │ │ ├── TemplateWidget.cs │ │ │ ├── TemplateWidgetExtensions.cs │ │ │ ├── TemplateWidgetInfo.cs │ │ │ ├── TemplateWidgetInfoExtensions.cs │ │ │ └── TemplateWidgetRenderer.cs │ │ ├── TemplateFileSystem.cs │ │ ├── TemplateFilters │ │ │ └── Filters.cs │ │ ├── TemplateManager.cs │ │ └── TemplateTags │ │ │ ├── Area.cs │ │ │ ├── Fetch.cs │ │ │ ├── HtmlLang.cs │ │ │ └── RawHtml.cs │ ├── Testing │ │ ├── TestEventHandlers │ │ │ └── TestConsoleEventHandler.cs │ │ └── TestManager.cs │ ├── Version.targets │ ├── Web │ │ ├── ActionAttribute.cs │ │ ├── ActionBaseAttribute.cs │ │ ├── ActionCollections │ │ │ └── DefaultActionCollection.cs │ │ ├── ActionFilterAttribute.cs │ │ ├── ActionParameterProviders │ │ │ └── DefaultActionParameterProvider.cs │ │ ├── ActionResults │ │ │ ├── FileEntryResult.cs │ │ │ ├── ImageResult.cs │ │ │ ├── JsonResult.cs │ │ │ ├── PlainResult.cs │ │ │ ├── RedirectResult.cs │ │ │ ├── StreamResult.cs │ │ │ └── TemplateResult.cs │ │ ├── ControllerManager.cs │ │ ├── HttpMethods.cs │ │ ├── HttpRequestHandlers │ │ │ ├── AddVersionHeaderHandler.cs │ │ │ └── DefaultErrorHandler.cs │ │ ├── IActionCollection.cs │ │ ├── IActionFilter.cs │ │ ├── IActionParameterProvider.cs │ │ ├── IActionResult.cs │ │ ├── IController.cs │ │ ├── IControllerExtensions.cs │ │ ├── IHttpRequestErrorHandler.cs │ │ ├── IHttpRequestHandler.cs │ │ ├── IHttpRequestHandlerWrapper.cs │ │ ├── IHttpRequestPostHandler.cs │ │ ├── IHttpRequestPreHandler.cs │ │ ├── IWebsiteStartHandler.cs │ │ ├── IWebsiteStopper.cs │ │ └── ThreadPoolInitializer.cs │ └── ZKWeb.csproj ├── ZKWebStandard │ ├── Collections │ │ ├── HierarchyDictionary.cs │ │ ├── HtmlString.cs │ │ ├── HttpContextCache.cs │ │ ├── IKeyValueCache.cs │ │ ├── LazyCache.cs │ │ ├── MemoryCache.cs │ │ ├── Pair.cs │ │ └── SimpleDisposable.cs │ ├── Extensions │ │ ├── ByteArrayExtensions.cs │ │ ├── DateTimeExtensions.cs │ │ ├── DecimalExtensions.cs │ │ ├── EnumExtensions.cs │ │ ├── ExceptionExtensions.cs │ │ ├── ExpressionExtensions.cs │ │ ├── IDictionaryExtensions.cs │ │ ├── IEnumerableExtensions.cs │ │ ├── IHttpContextExtensions.cs │ │ ├── IHttpRequestExtensions.cs │ │ ├── IHttpResponseExtensions.cs │ │ ├── IKeyValueCacheExtensions.cs │ │ ├── IListExtensions.cs │ │ ├── ISetExtensions.cs │ │ ├── ITreeNodeExtensions.cs │ │ ├── ImageExtensions.cs │ │ ├── MemberInfoExtensions.cs │ │ ├── MethodInfoExtensions.cs │ │ ├── ObjectExtensions.cs │ │ └── StreamExtensions.cs │ ├── Ioc │ │ ├── Container.cs │ │ ├── ContainerFactoryData.cs │ │ ├── ContainerFactoryDelegate.cs │ │ ├── ExportAttribute.cs │ │ ├── ExportAttributeBase.cs │ │ ├── ExportManyAttributes.cs │ │ ├── Extensions │ │ │ ├── ContainerFactoryBuilder.cs │ │ │ ├── IMultiConstructorResolver.cs │ │ │ ├── MultiConstructorResolver.cs │ │ │ ├── ServiceProviderAdapter.cs │ │ │ ├── ServiceProviderIntegration.cs │ │ │ └── ServiceScopeFactory.cs │ │ ├── IContainer.cs │ │ ├── IGenericRegistrator.cs │ │ ├── IGenericResolver.cs │ │ ├── IRegistrator.cs │ │ ├── IResolver.cs │ │ ├── IScopeDisposer.cs │ │ ├── IfUnresolved.cs │ │ ├── InjectAttribute.cs │ │ ├── ReuseAttribute.cs │ │ ├── ReuseType.cs │ │ ├── ScopedReuseAttribute.cs │ │ └── SingletonReuseAttribute.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Testing │ │ ├── Assert.cs │ │ ├── AssertException.cs │ │ ├── AssertPassedException.cs │ │ ├── AssertSkipedException.cs │ │ ├── Events │ │ │ ├── AllTestCompletedInfo.cs │ │ │ ├── AllTestStartingInfo.cs │ │ │ ├── DebugMessageInfo.cs │ │ │ ├── ErrorMessageInfo.cs │ │ │ ├── IUnitTestEventHandler.cs │ │ │ ├── TestFailedInfo.cs │ │ │ ├── TestPassedInfo.cs │ │ │ ├── TestSkippedInfo.cs │ │ │ └── TestStartingInfo.cs │ │ ├── Scenario.cs │ │ ├── ScenarioException.cs │ │ ├── TestResultCounter.cs │ │ ├── TestRunner.cs │ │ └── TestsAttribute.cs │ ├── Utils │ │ ├── ExpressionUtils.cs │ │ ├── FileUtils.cs │ │ ├── GuidUtils.cs │ │ ├── HttpUtils.cs │ │ ├── LocaleUtils.cs │ │ ├── MimeUtils.cs │ │ ├── NetworkUtils.cs │ │ ├── PasswordUtils.cs │ │ ├── PathUtils.cs │ │ ├── PlatformUtils.cs │ │ ├── RandomUtils.cs │ │ ├── ReflectionUtils.cs │ │ ├── RegexUtils.cs │ │ ├── SystemUtils.cs │ │ └── TreeUtils.cs │ ├── Web │ │ ├── HttpCookieOptions.cs │ │ ├── HttpException.cs │ │ ├── HttpManager.cs │ │ ├── IHttpContext.cs │ │ ├── IHttpPostedFile.cs │ │ ├── IHttpRequest.cs │ │ ├── IHttpResponse.cs │ │ ├── Mock │ │ │ ├── HttpContextMock.cs │ │ │ ├── HttpPostFileMock.cs │ │ │ ├── HttpRequestMock.cs │ │ │ └── HttpResponseMock.cs │ │ └── Wrappers │ │ │ ├── HttpContextWrapper.cs │ │ │ ├── HttpRequestWrapper.cs │ │ │ └── HttpResponseWrapper.cs │ └── ZKWebStandard.csproj └── nuget │ ├── ZKWeb.Hosting.AspNet.nuspec │ ├── ZKWeb.Hosting.AspNetCore.nuspec │ ├── ZKWeb.Hosting.Owin.nuspec │ ├── ZKWeb.ORM.Dapper.nuspec │ ├── ZKWeb.ORM.EFCore.nuspec │ ├── ZKWeb.ORM.InMemory.nuspec │ ├── ZKWeb.ORM.MongoDB.nuspec │ ├── ZKWeb.ORM.NHibernate.nuspec │ ├── ZKWeb.nuspec │ ├── pack.bat │ ├── pack.sh │ └── push.bat ├── appveyor.yml └── fix_version.py /.travis.yml: -------------------------------------------------------------------------------- 1 | language: csharp 2 | mono: none 3 | dotnet: 3.0.100 4 | dist: xenial 5 | sudo: required 6 | script: 7 | - sudo apt-get update 8 | - sudo apt-get install -y libgdiplus 9 | - cd ZKWeb/ZKWeb.Console 10 | - dotnet restore 11 | - dotnet run -c Release -f netcoreapp3.0 12 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2016~2019 303248153@qq.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the “Software”), 7 | to deal in the Software without restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 9 | and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or 12 | substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 15 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.0.9.5.md: -------------------------------------------------------------------------------- 1 | ### 0.9.5 Release Note 2 | 3 | ### 更新内容 4 | 5 | - 支持在内存占用超过一定值时自动清理缓存+回收内存 6 | - 在核心中添加缓存隔离策略Url, Locale, Device 7 | - 支持设备(手机和电脑)专用的模板 8 | - 支持单元测试中使用临时数据库 9 | - 替换Ioc容器到自己编写的容器 10 | - 补充核心组件的测试 11 | - 改进性能 12 | - 修复部分bug 13 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.0.9.6.md: -------------------------------------------------------------------------------- 1 | ### 0.9.6 Release Note 2 | 3 | ### 主要更新内容 4 | 5 | - 更改查找设备专用模板的规则,调整插件 > 设备到设备 > 插件 6 | - 更换Moq到NSubstitute 7 | - 添加过滤器: raw_html 8 | - 引入FastReflection加快dotliquid的描画速度 9 | - 扫描插件中的组件时只扫描公开的类型,加快冷启动速度 10 | - 添加X-ZKWeb-Version头 11 | 12 | 13 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.0.9.8.md: -------------------------------------------------------------------------------- 1 | ### 0.9.8 Release Note 2 | 3 | ### 主要更新内容 4 | 5 | - 同时提供Asp.Net和Asp.Net Core版本 6 | - Asp.Net Core版本请看aspnet_core分支 7 | - Asp.Net Core分支目前会继续更新,在1.0正式版之前会决定是否保留此版本 8 | - Asp.Net版本和Asp.Net Core版本兼容相同的插件 9 | - 改善部分性能 10 | 11 | ### 依赖关系 12 | 13 | Asp.Net版本
14 | ![](imgs.0.9.8/aspnet.dep.jpg) 15 | ![](imgs.0.9.8/aspnet.depstd.jpg) 16 | 17 | Asp.Net Core版本
18 | ![](imgs.0.9.8/aspnetcore.dep.jpg) 19 | ![](imgs.0.9.8/aspnetcore.depstd.jpg) 20 | 21 | ### 性能数据 22 | 23 | 2016-06-17 (i7 Q720 1.6Ghz x 4 core 8 threads, ab -n 8000 -c 16, real machine, asp.net core) 24 | 25 | - 首页 0.852ms, 0.799ms, 0.801ms 26 | - 商品列表页 0.879ms, 0.740ms, 0.742ms 27 | - 商品详情页 0.941ms, 0.877ms, 0.879ms 28 | 29 | 2016-06-17 (i7 Q720 1.6Ghz x 4 core 8 threads, ab -n 8000 -c 16, real machine, asp.net) 30 | 31 | - 首页 0.674ms, 0.688ms, 0.672ms 32 | - 商品列表页 0.648ms, 0.770ms, 0.645ms 33 | - 商品详情页 0.736ms, 0.756ms, 0.775ms 34 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.0.0-beta-1.md: -------------------------------------------------------------------------------- 1 | ### 1.0.0 beta 1 Release Note 2 | 3 | ### 主要更新内容 4 | 5 | - 同时提供Asp.Net, Asp.Net Core, Owin版本 6 | - 所有版本兼容相同的插件 7 | - 发布ZKWeb到nuget 8 | - 开发插件时应该引用nuget上的ZKWeb 9 | - 从这个版本开始将会尽量提供向后兼容性 10 | 11 | ### 已知问题 12 | 13 | - Asp.Net Core版本在返回304的时候有一定几率会变502 14 | - 目前预计是kestrel和iis之间的问题,单独运行kestrel时不会出现此问题 15 | - 等待Asp.Net Core RTM后再看是否已修复 16 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.0.0-beta-2~3.md: -------------------------------------------------------------------------------- 1 | ### 1.0.0 beta 2~3 Release Note 2 | 3 | ### 主要更新内容 4 | 5 | - 嵌入Hosting代码到主项目 6 | - 发布ZKWeb.Hosting.AspNet到Nuget 7 | - 发布ZKWeb.Hosting.AspNetCore到Nuget 8 | - 发布ZKWeb.Hosting.Owin到Nuget 9 | - ZKWebStandard兼容.Net Core 10 | - 添加IList.AddRange 11 | - 添加MemoryCache.GetOrCreate 12 | - 项目格式重新转换成xproj 13 | - 等待vs2016出来后还需要转换回csproj (roslyn-project-system) 14 | - 升级.net框架版本到4.6.1 15 | - 微软已经删除System.Diagnostics.Process等包中对4.5的支持,这次升级是万不得已 16 | - 提供项目生成器 17 | - 界面版 Tools\ProjectCreator.Gui.exe 18 | - 命令版 Tools\ProjectCreator.Cmd.exe 19 | - 提供网站发布器 20 | - 界面版 Tools\WebsitePublisher.Gui.exe 21 | - 命令版 Tools\WebsitePublisher.Cmd.exe 22 | 23 | ### 已知问题 24 | 25 | - 请参考beta 1的已知问题 26 | - Asp.Net Core的502问题因为升级到RTM仍然出现,将会尽快调查原因 27 | 28 | ### 兼容.Net Core需要的条件 29 | 30 | 目前完全兼容.Net Core仍然比较困难,主要由于引用的类库仍未兼容。 31 | 32 | - System.Drawing 33 | - 官方未有计划 34 | - CSScript 35 | - 官方未有计划 36 | - FluentNHibernate, NHibernate 37 | - https://nhibernate.jira.com/browse/NH-3807 38 | - NSubstitute 39 | - https://github.com/nsubstitute/NSubstitute/issues/192 40 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.0.0-beta-4.md: -------------------------------------------------------------------------------- 1 | ### 1.0.0 beta 4 Release Note 2 | 3 | ### 主要更新内容 4 | 5 | - 更新项目生成器 6 | - 修复因为程序集同名导致NHibernate配置失败的问题 7 | - 更新网站发布器 8 | - 支持发布Asp.Net Core网站到IIS 9 | - 修复Http错误处理器的调用顺序 10 | - 更换CsScript到Roslyn 11 | - 插件已支持c# 6.0的语法 12 | - 初步支持.Net Core 13 | - 简单的插件可以在.Net Core下编译 14 | - 数据库等功能仍未支持,请参考"未兼容.Net Core的部分" 15 | 16 | ### 如何从之前的版本升级 17 | 18 | 通过nuget更新"ZKWeb"和"ZKWeb.Hosting.{运行环境}"包即可,更新后可以删除不再需要的"CsScript"包。 19 | 如果需要尝试运行在.Net Core上请重新生成Asp.Net Core项目。 20 | 21 | ### 已知问题 22 | 23 | - Asp.Net Core的502问题 24 | - https://github.com/aspnet/IISIntegration/issues/219 25 | 26 | ### 未兼容.Net Core的部分 27 | 28 | 这个版本提供了初步的.Net Core支持,但以下部分仍未兼容 29 | 30 | - System.Drawing 31 | - 官方未有计划,可能需要换成其他类库 32 | - https://github.com/JimBobSquarePants/ImageProcessor 33 | - FluentNHibernate, NHibernate 34 | - https://nhibernate.jira.com/browse/NH-3807 35 | - NSubstitute 36 | - https://github.com/nsubstitute/NSubstitute/issues/192 37 | - https://github.com/nsubstitute/NSubstitute/pull/197 38 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.0.0-beta-5.md: -------------------------------------------------------------------------------- 1 | ### 1.0.0 beta 5 Release Note 2 | 3 | ### 主要更新内容 4 | 5 | - 修复使用Roslyn编译的插件无法正常调试的功能 6 | - 添加ZKWeb.CompilePluginsWithReleaseConfiguration选项 7 | - 修改此选项后需要手动删除原有编译的bin文件夹才能生效 8 | - 添加decimal.Normalize函数 9 | 10 | ### 已知问题 11 | 12 | - Asp.Net Core的502问题 13 | - https://github.com/aspnet/IISIntegration/issues/219 14 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.0.0-final.md: -------------------------------------------------------------------------------- 1 | ### 1.0.0 final Release Note 2 | 3 | This version bring many small fixes. 4 | 5 | ### Changes 6 | 7 | - Framework changes 8 | - Improve website publisher error message 9 | - Make Asp.Net Core website reboot after initialization failed 10 | - Make website start handler execute after controllers initialized 11 | - Support mapping action parameter from all request parameter 12 | - Support mapping action parameter from json contents 13 | - Improve error message for type have no public constrcutor 14 | - ORM changes 15 | - Support retrieve ORM name and database type from IDatabaseContext 16 | - Support retrieve ORM name from IEntityMappingBuilder 17 | - Allow pass before delete action to IDatabaseContext.BatchDelete 18 | - NHibernate changes 19 | - Fix Guid entity key support 20 | - Support specific navigation column name for HasMany, HasManyToMany 21 | - Entity Framework Core changes 22 | - Fix Guid entity key support 23 | - Fix incorrect nullable settings 24 | - Fix old MSSQL support 25 | - Support cascade option in many-to-one part 26 | - Support specific navigation property for Reference, HasMany, HasManyToMany 27 | - Use unique index instead of alternate key 28 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.0.0-rc-1.md: -------------------------------------------------------------------------------- 1 | ### 1.0.0 rc 1 Release Note 2 | 3 | ### Changes 4 | 5 | - Translate all comments to english 6 | - Fix Asp.Net Core 502 error when returnning 304 7 | - IoC container support constructor dependency injection 8 | - Serveral small fixes 9 | 10 | ### Breaking Changes 11 | 12 | - Provide full support for .Net Core 13 | - Support multiple ORM 14 | - Support Dapper 15 | - Support EntityFramework Core 16 | - Support InMemory 17 | - Support MongoDB 18 | - Support NHibernate 19 | - Replace System.Drawing with ZKWeb.System.Drawing 20 | - Require mono's libgdiplus.dll on linux and osx 21 | - ZKWeb.System.Drawing is fork from CoreCompat.System.Drawing 22 | 23 | ### Upgrade from previous version 24 | 25 | - Replace "DatabaseContext" with "IDatabaseContext" 26 | - Replace "DatabaseManager.GetContext" with "DatabaseManager.CreateContext" 27 | - Use "IEntityOperationHandler" Instead of "IDataSaveCallback" and "IDataDeleteCallback" 28 | - Install "ZKWeb.ORM.NHibernate" and "ZKWeb.ORM.InMemory" from nuget 29 | - Database transaction is not enabled by default anymore, enable it manually if needed 30 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.0.0-rc-2.md: -------------------------------------------------------------------------------- 1 | ### 1.0.0 rc 2 Release Note 2 | 3 | ### Changes 4 | 5 | - Track loaded assemblies manually with .Net Core 6 | - Improve fix for Asp.Net Core 502 error when returnning 304 7 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.0.0-rc-3.md: -------------------------------------------------------------------------------- 1 | ### 1.0.0 rc 3 Release Note 2 | 3 | ### Changes 4 | 5 | - Improve fix for Asp.Net Core 502 error when returnning 304 6 | - Support controller constructor dependency injection 7 | - Support automatic fill action parameters from http request 8 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.0.1.md: -------------------------------------------------------------------------------- 1 | ### 1.0.1 Release Note 2 | 3 | ### Changes 4 | 5 | - Update dependencies 6 | - Update Microsoft.EntityFrameworkCore to 1.0.1 7 | - Update MongoDB.Driver to 2.3.0-rc1 8 | - Update MySql.Data to 7.0.5-IR21 9 | - Bug fixes 10 | - Use FileShare.Read option in IHttpResponseExtensions.WriteFile 11 | - Log errors from NHibernate schema update 12 | - Make SQLite schema update with NHibernate work again (Switch back to ZKWeb.Repack.SQLite) 13 | - Improvements 14 | - Display message from most inner exception on request error 15 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.1.md: -------------------------------------------------------------------------------- 1 | ### 1.1 Release Note 2 | 3 | ### Changes 4 | 5 | - Improvements 6 | - Add EFCore PostgreSQL support 7 | - Add HtmlString.Encode, HtmlString.Decode 8 | - Add IKeyValueCache, the abstrace interface for key-value cache 9 | - Add ICacheFacotry, the abstract interface for creating cache 10 | - Add IFileStorage, the abstract interface for file storage 11 | - Add FileEntryResult, to replace FileResult 12 | 13 | - Deprecates 14 | - Mark IsolatedMemoryCache obsoleted, please use ICacheFactory 15 | - Mark PathConfig obsoleted, please use IFileStorage 16 | - May break some testing code that mock this class 17 | - Mark PathManager obsoleted, please use IFileStorage 18 | - May break some testing code that mock this class 19 | - Mark FileResult obsoleted, please use FileEntryResult 20 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.2.md: -------------------------------------------------------------------------------- 1 | ### 1.2 Release Note 2 | 3 | ### Changes 4 | 5 | - Update ZKWeb.Fork.DotLiquid to 2.1.0 6 | - Update FastReflection to 2.1.0 7 | - Update ZKWeb.System.Drawing to 2.0.0 8 | - Add PlatformUtils (provide methods: RunningOnWindows, RunningOnUnix) 9 | - Use IgnoreCorLibraryDuplicatedTypes for roslyn to avoid type exists in both error 10 | - Linux support 11 | - These distributions are tested 12 | - Ubuntu 16.04 LTS 64bit 13 | - CentOS 7.2 64bit 14 | - Fedora 24 64bit 15 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.4.md: -------------------------------------------------------------------------------- 1 | ### 1.4 Release Note 2 | 3 | ### Changes 4 | 5 | - Add fast batch action to database context 6 | - Add IDatabaseContext.FastBatchSave 7 | - Add IDatabaseContext.FastBatchDelete 8 | - Add IHttpRequestPostHandler 9 | - Usually used to cleanup things done in pre handler 10 | - Add IActionFilter 11 | - Can register as global action filter 12 | - Add ActionFilterAttribute 13 | - Can mark with per action 14 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.5.1.md: -------------------------------------------------------------------------------- 1 | ### 1.5.1 Release Note 2 | 3 | ### Changes 4 | 5 | - Ensure data-widget won't be empty 6 | - Improve widget cache performance when widget have arguments 7 | - Update out of date nuget package dependency 8 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.5.2.md: -------------------------------------------------------------------------------- 1 | ### 1.5.2 Release Note 2 | 3 | ### Changes 4 | 5 | - Bug fixes 6 | - Don't set ef core migration history's string property length 7 | - Update packages 8 | - Pomelo.EntityFrameworkCore.MySql 1.1.0 9 | - Add Pair<,> to template safe types 10 | - Add TemplateWidgetInfo to template safe types 11 | - Add Description and Extra to TemplateWidgetInfo 12 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.5.3.md: -------------------------------------------------------------------------------- 1 | ### 1.5.3 Release Note 2 | 3 | ### Changes 4 | 5 | - Don't throw error when resolve dependencies from constructor for better compatibility 6 | - Add "charset=utf-8" to json, plain, template result's content type 7 | - Allow setting custom content type to json, plain, template, file result 8 | - Update packages 9 | - ZKWeb.Repack.SQLite 1.0.104 10 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.5.md: -------------------------------------------------------------------------------- 1 | ### 1.5 Release Note 2 | 3 | ### Changes 4 | 5 | - Significantly improve ioc container performance in some cases 6 | - Add IHttpResquestHandlerWrapper for easier override http context 7 | - Add Arguments member into TemplateWidgetInfo 8 | - MemberInfo.GetAttributes support passing inherit option 9 | - IoC container now choose constructor that have most parameters instead of choose first constructor 10 | - Bug fixes 11 | - Fix override ioc dispose error 12 | - Upgrade packages 13 | - ZKWeb.Fork.DotLiquid 2.1.1 14 | - ZKWeb.Fork.FastReflection 2.1.1 15 | - ZKWeb.System.Drawing 2.0.1 16 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.6.md: -------------------------------------------------------------------------------- 1 | ### 1.6 Release Note 2 | 3 | ### Changes 4 | 5 | - Dapper enhancement 6 | - Change Dapper.Contrib to Dommel 7 | - Support custom column name 8 | - Support ignore unmapped property 9 | - Support insert guid key into mysql database 10 | - Support serialized type 11 | - Log error instead of throw exception for unsupported ORM mapping action 12 | - Support retrieve underlying database connection from IDatabaseContext 13 | - Add TemplateManager.CreateHash 14 | - Split template widget render logic to ITemplateWidgetRenderer 15 | - Bug fixes 16 | - LocalFileEntry.OpenWrite should truncate exists file 17 | - TemplateWidget.Args should be IDictionary for deserialize from json 18 | - Update packages 19 | - NHibernate 4.1.1.4000 20 | - Npgsql 3.2.1 21 | - NSubstitute 2.0.1-rc 22 | - MongoDB.Driver 2.4.2 23 | - Microsoft.DiaSymReader.PortablePdb 1.2.0 24 | - Microsoft.DiaSymReader.Native 1.5.0-beta2-24728 25 | - Microsoft.CodeAnalysis.CSharp 2.0.0-rc4 26 | - Dommel 1.8.0 27 | - Dapper.FluentMap 1.5.1 28 | - Dapper.FluentMap.Dommel 1.4.3 29 | - ZKWeb.Repack.SQLite 1.0.104 30 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.7.md: -------------------------------------------------------------------------------- 1 | ### 1.7 Release Note 2 | 3 | ### Changes 4 | 5 | - Update project format to new csproj, you will need vs2017 to open newly created Asp.Net Core project 6 | - Update project templates 7 | - Add [SingletonReuse] to project template's Plugin class 8 | - Add utility classes 9 | - Add NetworkUtils for getting ip address 10 | - IoC container improvement 11 | - Add Container.UnregisterImplementation 12 | - Add InjectAttribute for manually choose constructor to inject 13 | - Entity framework core improvement 14 | - Support save detached entity that key is not empty and not exists in database 15 | - Wesite stopper improvement 16 | - Wait for requests finished before stop website up to 3 seconds 17 | - Support publish to other platform 18 | - publish tool support framework option, default is net461 19 | - Update packages 20 | Dapper.FluentMap 1.5.3 21 | Dapper.FluentMap.Dommel 1.4.5 22 | Dommel 1.8.1 23 | Npgsql 3.2.2 24 | MongoDB.Driver 2.4.3 25 | NSubstitute 2.0.2 26 | Newtonsoft.Json 10.0.1 27 | Microsoft.CodeAnalysis.CSharp 2.0.0 28 | Microsoft.Extensions.DependencyModel 1.1.1 29 | Microsoft.DiaSymReader.Native 1.5.0 30 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.8.md: -------------------------------------------------------------------------------- 1 | ### 1.8 Release Note 2 | 3 | ### Breaking changes 4 | 5 | - Upgrade ZKWeb.System.Drawing to 3.0.0 6 | - Please renamed `System.Drawing` to `System.DrawingCore` in your code 7 | - We can throw `DisableImplicitFrameworkReferences` option away and no longer need to face errors given by vs2017 8 | 9 | ### Changes 10 | 11 | - Add IActionParameterProvider 12 | - Can be used to customize the method of getting action parameters 13 | - Add `UseZKWeb` for Asp.Net Core and Owin 14 | - Allow provide custom Application class 15 | - The initialize process can be customized now 16 | - Please see `IApplication` and `DefaultApplication` 17 | - Improve assembly dependency resolving by preload referenced assemblies 18 | - Improve publish tool 19 | - Support publish project with netcoreapp1.1 20 | - Bug fixes 21 | - Fix deserialize `string` to `ZKWeb.Localize.T` failed 22 | - Support `dynamic` keyword in plugin compilation 23 | - Upgrade packages 24 | - NSubstitute 2.0.3 25 | - Newtonsoft.Json 10.0.2 26 | - Microsoft.CodeAnalysis.CSharp 2.1.0 27 | - Microsoft.Owin 3.1.0 28 | - Pomole.EntityFrameworkCore.MySql 1.1.1 29 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.9.1.md: -------------------------------------------------------------------------------- 1 | ### 1.9.1 Release Note 2 | 3 | ### Changes 4 | 5 | - Improve ORM layer 6 | - Allow disable database auto migration for NHibernate or EFCore 7 | - Add `"ZKWeb.DisableEFCoreDatabaseAutoMigration": true` under `Extra` in `App_Data\config.json` 8 | - Add `"ZKWeb.DisableNHibernateDatabaseAutoMigration": true` under `Extra` in `App_Data\config.json` 9 | - Bug fixes 10 | - Fix auto increment primary key support for dapper 11 | - Make project creator write files with utf-8 bom 12 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.1.9.md: -------------------------------------------------------------------------------- 1 | ### 1.9 Release Note 2 | 3 | ### Changes 4 | 5 | - Update toolkit 6 | - Improve linux support 7 | - Add utility functions 8 | - Exception.ToDetailedString 9 | - Exception.ToSummaryString 10 | - Expression.ReplaceNode 11 | - Improve application initialization 12 | - Log emergency log when initialize failed 13 | - Change protect level of `Initialize` methods, from "internal static" to "internal protected virtual" 14 | - Improve template engine 15 | - Keep widget before and after html when render failed 16 | - Improve IoC container 17 | - Add ExportAttributeBase 18 | - Improve ORM layer 19 | - Support specify table name in mapping builder, eg: builder.TableName("MyTable") 20 | - Change protect level of classes, from "internal" to "public" 21 | - Improve visual studio support 22 | - Mark Response.End as DebuggerNonUserCode to make visual studio ignore the exception 23 | - Update project template 24 | - Allow Asp.Net Core hosting take configuration from command line and json 25 | - Bug fixes 26 | - Fix IFileEntry.WriteAllBytes 27 | -------------------------------------------------------------------------------- /ReleaseNotes/ReleaseNote.2.2.1.md: -------------------------------------------------------------------------------- 1 | ### 2.2.1 Release Note 2 | 3 | ### Changes 4 | 5 | - Improve EFCore Support 6 | - Enable WithSerialization option for entity mapping builder 7 | - Enable lazy loading 8 | -------------------------------------------------------------------------------- /ReleaseNotes/Roadmap.md: -------------------------------------------------------------------------------- 1 | Future 2 | 3 | - Update dapper context since query transaction is supported in dommel 4 | - It's in 2.0 beta, not stabel yet 5 | - Performance moniting interface 6 | - Report http request time to interface 7 | - Report database operation time to interface 8 | - APM Integration 9 | - https://github.com/ButterflyAPM/butterfly-csharp 10 | - https://github.com/OpenSkywalking/skywalking-netcore 11 | -------------------------------------------------------------------------------- /ReleaseNotes/imgs.0.9.8/aspnet.dep.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ReleaseNotes/imgs.0.9.8/aspnet.dep.jpg -------------------------------------------------------------------------------- /ReleaseNotes/imgs.0.9.8/aspnet.depstd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ReleaseNotes/imgs.0.9.8/aspnet.depstd.jpg -------------------------------------------------------------------------------- /ReleaseNotes/imgs.0.9.8/aspnetcore.dep.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ReleaseNotes/imgs.0.9.8/aspnetcore.dep.jpg -------------------------------------------------------------------------------- /ReleaseNotes/imgs.0.9.8/aspnetcore.depstd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ReleaseNotes/imgs.0.9.8/aspnetcore.depstd.jpg -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.NetCore/Mono.Options.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.NetCore/Mono.Options.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.NetCore/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.NetCore/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.NetCore/ZKWeb.Toolkits.ProjectCreator.Cmd.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.NetCore/ZKWeb.Toolkits.ProjectCreator.Cmd.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.NetCore/ZKWeb.Toolkits.ProjectCreator.Cmd.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.NetCore/ZKWeb.Toolkits.ProjectCreator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.NetCore/ZKWeb.Toolkits.ProjectCreator.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.NetCore/zh-CN/ZKWeb.Toolkits.ProjectCreator.Cmd.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.NetCore/zh-CN/ZKWeb.Toolkits.ProjectCreator.Cmd.resources.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.NetCore/zh-CN/ZKWeb.Toolkits.ProjectCreator.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.NetCore/zh-CN/ZKWeb.Toolkits.ProjectCreator.resources.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.Windows/Mono.Options.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.Windows/Mono.Options.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.Windows/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.Windows/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.Windows/ZKWeb.Toolkits.ProjectCreator.Cmd.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.Windows/ZKWeb.Toolkits.ProjectCreator.Cmd.exe -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.Windows/ZKWeb.Toolkits.ProjectCreator.Cmd.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.Windows/ZKWeb.Toolkits.ProjectCreator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.Windows/ZKWeb.Toolkits.ProjectCreator.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.Windows/zh-CN/ZKWeb.Toolkits.ProjectCreator.Cmd.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.Windows/zh-CN/ZKWeb.Toolkits.ProjectCreator.Cmd.resources.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Cmd.Windows/zh-CN/ZKWeb.Toolkits.ProjectCreator.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Cmd.Windows/zh-CN/ZKWeb.Toolkits.ProjectCreator.resources.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/Google.ProtocolBuffers.Serialization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/Google.ProtocolBuffers.Serialization.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/Google.ProtocolBuffers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/Google.ProtocolBuffers.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/Microsoft.Data.Sqlite.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/Microsoft.Data.Sqlite.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/MongoDB.Bson.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/MongoDB.Bson.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/MongoDB.Driver.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/MongoDB.Driver.Core.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/MongoDB.Driver.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/MongoDB.Driver.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/MySql.Data.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/MySql.Data.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/Npgsql.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/Npgsql.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/ZKWeb.Toolkits.ProjectCreator.Gui.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/ZKWeb.Toolkits.ProjectCreator.Gui.exe -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/ZKWeb.Toolkits.ProjectCreator.Gui.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/ZKWeb.Toolkits.ProjectCreator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/ZKWeb.Toolkits.ProjectCreator.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/x86/sqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/x86/sqlite3.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/zh-CN/ZKWeb.Toolkits.ProjectCreator.Gui.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/zh-CN/ZKWeb.Toolkits.ProjectCreator.Gui.resources.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/zh-CN/ZKWeb.Toolkits.ProjectCreator.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/zh-CN/ZKWeb.Toolkits.ProjectCreator.resources.dll -------------------------------------------------------------------------------- /Tools/ProjectCreator.Gui.Windows/zh-Hans/ZKWeb.Toolkits.ProjectCreator.Gui.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/ProjectCreator.Gui.Windows/zh-Hans/ZKWeb.Toolkits.ProjectCreator.Gui.resources.dll -------------------------------------------------------------------------------- /Tools/Templates/AspNet.Dapper/__ProjectName__.AspNet/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/AspNet.Dapper/__ProjectName__.AspNet/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.Dapper/__ProjectName__.AspNet/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="__ProjectName__.AspNet.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.Dapper/__ProjectName__.AspNet/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Hosting.AspNet; 2 | 3 | namespace __ProjectName__.AspNet { 4 | /// 5 | /// Asp.Net Global Class 6 | /// 7 | public class Global : GlobalBase { } 8 | } 9 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.EFCore/__ProjectName__.AspNet/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/AspNet.EFCore/__ProjectName__.AspNet/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.EFCore/__ProjectName__.AspNet/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="__ProjectName__.AspNet.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.EFCore/__ProjectName__.AspNet/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Hosting.AspNet; 2 | 3 | namespace __ProjectName__.AspNet { 4 | /// 5 | /// Asp.Net Global Class 6 | /// 7 | public class Global : GlobalBase { } 8 | } 9 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.MongoDB/__ProjectName__.AspNet/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/AspNet.MongoDB/__ProjectName__.AspNet/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.MongoDB/__ProjectName__.AspNet/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="__ProjectName__.AspNet.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.MongoDB/__ProjectName__.AspNet/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Hosting.AspNet; 2 | 3 | namespace __ProjectName__.AspNet { 4 | /// 5 | /// Asp.Net Global Class 6 | /// 7 | public class Global : GlobalBase { } 8 | } 9 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.NHibernate/__ProjectName__.AspNet/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/AspNet.NHibernate/__ProjectName__.AspNet/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.NHibernate/__ProjectName__.AspNet/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="__ProjectName__.AspNet.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNet.NHibernate/__ProjectName__.AspNet/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Hosting.AspNet; 2 | 3 | namespace __ProjectName__.AspNet { 4 | /// 5 | /// Asp.Net Global Class 6 | /// 7 | public class Global : GlobalBase { } 8 | } 9 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.Dapper/src/__ProjectName__.AspNetCore/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.Dapper/src/__ProjectName__.AspNetCore/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.Dapper/src/__ProjectName__.AspNetCore/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50000/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "__ProjectName__.AspNetCore": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "launchUrl": "http://localhost:40000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.Dapper/src/__ProjectName__.AspNetCore/Startup.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Hosting.AspNetCore; 2 | 3 | namespace __ProjectName__.AspNetCore 4 | { 5 | /// 6 | /// Asp.Net Core Startup Class 7 | /// 8 | public class Startup : StartupBase 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.Dapper/src/__ProjectName__.AspNetCore/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.Dapper/src/__ProjectName__.AspNetCore/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.Dapper/src/__ProjectName__.Console/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("__ProjectName__.Console")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("fc8611cf-a950-4fc1-bf0e-cbe87b820901")] 20 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.Dapper/src/__ProjectName__.Plugins/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("__ProjectName__.Plugins")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("fc8611cf-a950-4fc1-bf0e-cbe87b820902")] 20 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.Dapper/src/__ProjectName__.Plugins/__ProjectName__.Plugins.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net461;netstandard2.0 5 | __ProjectName__.Plugins 6 | __ProjectName__.Plugins 7 | false 8 | false 9 | false 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | $(DefineConstants);NETCORE 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.EFCore/src/__ProjectName__.AspNetCore/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.EFCore/src/__ProjectName__.AspNetCore/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.EFCore/src/__ProjectName__.AspNetCore/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50000/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "__ProjectName__.AspNetCore": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "launchUrl": "http://localhost:40000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.EFCore/src/__ProjectName__.AspNetCore/Startup.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Hosting.AspNetCore; 2 | 3 | namespace __ProjectName__.AspNetCore 4 | { 5 | /// 6 | /// Asp.Net Core Startup Class 7 | /// 8 | public class Startup : StartupBase 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.EFCore/src/__ProjectName__.AspNetCore/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.EFCore/src/__ProjectName__.AspNetCore/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.EFCore/src/__ProjectName__.Console/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("__ProjectName__.Console")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("fc8611cf-a950-4fc1-bf0e-cbe87b820901")] 20 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.EFCore/src/__ProjectName__.Plugins/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("__ProjectName__.Plugins")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("fc8611cf-a950-4fc1-bf0e-cbe87b820902")] 20 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.EFCore/src/__ProjectName__.Plugins/__ProjectName__.Plugins.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net461;netstandard2.0 5 | __ProjectName__.Plugins 6 | __ProjectName__.Plugins 7 | false 8 | false 9 | false 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | $(DefineConstants);NETCORE 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.MongoDB/src/__ProjectName__.AspNetCore/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.MongoDB/src/__ProjectName__.AspNetCore/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.MongoDB/src/__ProjectName__.AspNetCore/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50000/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "__ProjectName__.AspNetCore": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "launchUrl": "http://localhost:40000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.MongoDB/src/__ProjectName__.AspNetCore/Startup.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Hosting.AspNetCore; 2 | 3 | namespace __ProjectName__.AspNetCore 4 | { 5 | /// 6 | /// Asp.Net Core Startup Class 7 | /// 8 | public class Startup : StartupBase 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.MongoDB/src/__ProjectName__.AspNetCore/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.MongoDB/src/__ProjectName__.AspNetCore/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.MongoDB/src/__ProjectName__.Console/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("__ProjectName__.Console")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("fc8611cf-a950-4fc1-bf0e-cbe87b820901")] 20 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.MongoDB/src/__ProjectName__.Plugins/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("__ProjectName__.Plugins")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("fc8611cf-a950-4fc1-bf0e-cbe87b820902")] 20 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.MongoDB/src/__ProjectName__.Plugins/__ProjectName__.Plugins.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net461;netstandard2.0 5 | __ProjectName__.Plugins 6 | __ProjectName__.Plugins 7 | false 8 | false 9 | false 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | $(DefineConstants);NETCORE 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.NHibernate/src/__ProjectName__.AspNetCore/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.NHibernate/src/__ProjectName__.AspNetCore/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.NHibernate/src/__ProjectName__.AspNetCore/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50000/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "__ProjectName__.AspNetCore": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "launchUrl": "http://localhost:40000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.NHibernate/src/__ProjectName__.AspNetCore/Startup.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Hosting.AspNetCore; 2 | 3 | namespace __ProjectName__.AspNetCore 4 | { 5 | /// 6 | /// Asp.Net Core Startup Class 7 | /// 8 | public class Startup : StartupBase 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.NHibernate/src/__ProjectName__.AspNetCore/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.NHibernate/src/__ProjectName__.AspNetCore/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.NHibernate/src/__ProjectName__.Console/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("__ProjectName__.Console")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("fc8611cf-a950-4fc1-bf0e-cbe87b820901")] 20 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.NHibernate/src/__ProjectName__.Plugins/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("__ProjectName__.Plugins")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("fc8611cf-a950-4fc1-bf0e-cbe87b820902")] 20 | -------------------------------------------------------------------------------- /Tools/Templates/AspNetCore.NHibernate/src/__ProjectName__.Plugins/__ProjectName__.Plugins.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net461;netstandard2.0 5 | __ProjectName__.Plugins 6 | __ProjectName__.Plugins 7 | false 8 | false 9 | false 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | $(DefineConstants);NETCORE 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Tools/Templates/BootstrapPlugin/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "__ProjectName__", 3 | "Version": "0.1", 4 | "Description": "__ProjectDescription__", 5 | "Dependencies": [ ] 6 | } 7 | -------------------------------------------------------------------------------- /Tools/Templates/BootstrapPlugin/src/Plugin.cs: -------------------------------------------------------------------------------- 1 | using __ProjectName__.Plugins.__ProjectName__.src.Controllers; 2 | using System.Linq; 3 | using ZKWeb; 4 | using ZKWeb.Plugin; 5 | using ZKWeb.Web; 6 | using ZKWebStandard.Ioc; 7 | 8 | namespace __ProjectName__.Plugins.__ProjectName__.src 9 | { 10 | /// 11 | /// Plugin Entry Point 12 | /// 13 | [ExportMany, SingletonReuse] 14 | public class Plugin : IPlugin 15 | { 16 | /// 17 | /// Here will execute after plugin loaded 18 | /// 19 | public Plugin() 20 | { 21 | // Register hello controller if default plugin collections are not used 22 | var controllerManager = Application.Ioc.Resolve(); 23 | var pluginManager = Application.Ioc.Resolve(); 24 | if (!pluginManager.Plugins.Any(p => p.DirectoryName() == "Common.Base")) 25 | { 26 | controllerManager.RegisterController(new HelloController()); 27 | Application.Ioc.RegisterMany(ReuseType.Singleton); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Tools/Templates/BootstrapPlugin/static/__ProjectName__.css/hello.css: -------------------------------------------------------------------------------- 1 | body > h1 { 2 | color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /Tools/Templates/BootstrapPlugin/static/__ProjectName__.js/hello.js: -------------------------------------------------------------------------------- 1 | alert("hello world from js!"); 2 | -------------------------------------------------------------------------------- /Tools/Templates/BootstrapPlugin/templates/__ProjectName__/hello.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Hello 5 | 6 | 7 | 8 |

Hello {{ text }}!

9 |
10 |
11 |

If you're seeing this, that mean you didn't use default plugin collections.

12 |

So this is an empty project.

13 |

You can open src\Controllers\HelloController.cs and add something to it.

14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Tools/Templates/Owin.Dapper/__ProjectName__.Owin/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/Owin.Dapper/__ProjectName__.Owin/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/Owin.Dapper/__ProjectName__.Owin/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using ZKWeb.Hosting.Owin; 3 | 4 | [assembly: OwinStartup(typeof(__ProjectName__.Owin.Startup))] 5 | namespace __ProjectName__.Owin { 6 | /// 7 | /// 程序入口点 8 | /// 9 | public class Startup : StartupBase { } 10 | } 11 | -------------------------------------------------------------------------------- /Tools/Templates/Owin.EFCore/__ProjectName__.Owin/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/Owin.EFCore/__ProjectName__.Owin/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/Owin.EFCore/__ProjectName__.Owin/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using ZKWeb.Hosting.Owin; 3 | 4 | [assembly: OwinStartup(typeof(__ProjectName__.Owin.Startup))] 5 | namespace __ProjectName__.Owin { 6 | /// 7 | /// 程序入口点 8 | /// 9 | public class Startup : StartupBase { } 10 | } 11 | -------------------------------------------------------------------------------- /Tools/Templates/Owin.MongoDB/__ProjectName__.Owin/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/Owin.MongoDB/__ProjectName__.Owin/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/Owin.MongoDB/__ProjectName__.Owin/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using ZKWeb.Hosting.Owin; 3 | 4 | [assembly: OwinStartup(typeof(__ProjectName__.Owin.Startup))] 5 | namespace __ProjectName__.Owin { 6 | /// 7 | /// 程序入口点 8 | /// 9 | public class Startup : StartupBase { } 10 | } 11 | -------------------------------------------------------------------------------- /Tools/Templates/Owin.NHibernate/__ProjectName__.Owin/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /Tools/Templates/Owin.NHibernate/__ProjectName__.Owin/App_Data/config.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Tools/Templates/Owin.NHibernate/__ProjectName__.Owin/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using ZKWeb.Hosting.Owin; 3 | 4 | [assembly: OwinStartup(typeof(__ProjectName__.Owin.Startup))] 5 | namespace __ProjectName__.Owin { 6 | /// 7 | /// 程序入口点 8 | /// 9 | public class Startup : StartupBase { } 10 | } 11 | -------------------------------------------------------------------------------- /Tools/Templates/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set DevenvPath="D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe" 4 | 5 | call :BuildNET AspNet.Dapper 6 | call :BuildNET AspNet.EFCore 7 | call :BuildNET AspNet.MongoDB 8 | call :BuildNET AspNet.NHibernate 9 | call :BuildNETCore AspNetCore.Dapper 10 | call :BuildNETCore AspNetCore.EFCore 11 | call :BuildNETCore AspNetCore.MongoDB 12 | call :BuildNETCore AspNetCore.NHibernate 13 | call :BuildNET Owin.Dapper 14 | call :BuildNET Owin.EFCore 15 | call :BuildNET Owin.MongoDB 16 | call :BuildNET Owin.NHibernate 17 | timeout 5 18 | exit 0 19 | 20 | :BuildNETCore 21 | echo Build %~1 22 | cd %~1 23 | dotnet restore 24 | dotnet build -c Release 25 | cd .. 26 | exit /b 0 27 | 28 | :BuildNET 29 | echo Build %~1 30 | cd %~1 31 | %DevenvPath% /Build Release __ProjectName__.sln 32 | cd .. 33 | exit /b 0 -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.NetCore/Mono.Options.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.NetCore/Mono.Options.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.NetCore/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.NetCore/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.NetCore/ZKWeb.Toolkits.WebsitePublisher.Cmd.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.NetCore/ZKWeb.Toolkits.WebsitePublisher.Cmd.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.NetCore/ZKWeb.Toolkits.WebsitePublisher.Cmd.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.NetCore/ZKWeb.Toolkits.WebsitePublisher.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.NetCore/ZKWeb.Toolkits.WebsitePublisher.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.NetCore/zh-CN/ZKWeb.Toolkits.WebsitePublisher.Cmd.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.NetCore/zh-CN/ZKWeb.Toolkits.WebsitePublisher.Cmd.resources.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.NetCore/zh-CN/ZKWeb.Toolkits.WebsitePublisher.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.NetCore/zh-CN/ZKWeb.Toolkits.WebsitePublisher.resources.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.Windows/Mono.Options.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.Windows/Mono.Options.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.Windows/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.Windows/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.Windows/ZKWeb.Toolkits.WebsitePublisher.Cmd.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.Windows/ZKWeb.Toolkits.WebsitePublisher.Cmd.exe -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.Windows/ZKWeb.Toolkits.WebsitePublisher.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.Windows/ZKWeb.Toolkits.WebsitePublisher.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.Windows/zh-CN/ZKWeb.Toolkits.WebsitePublisher.Cmd.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.Windows/zh-CN/ZKWeb.Toolkits.WebsitePublisher.Cmd.resources.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Cmd.Windows/zh-CN/ZKWeb.Toolkits.WebsitePublisher.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Cmd.Windows/zh-CN/ZKWeb.Toolkits.WebsitePublisher.resources.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Gui.Windows/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Gui.Windows/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Gui.Windows/ZKWeb.Toolkits.WebsitePublisher.Gui.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Gui.Windows/ZKWeb.Toolkits.WebsitePublisher.Gui.exe -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Gui.Windows/ZKWeb.Toolkits.WebsitePublisher.Gui.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Gui.Windows/ZKWeb.Toolkits.WebsitePublisher.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Gui.Windows/ZKWeb.Toolkits.WebsitePublisher.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Gui.Windows/zh-CN/ZKWeb.Toolkits.WebsitePublisher.Gui.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Gui.Windows/zh-CN/ZKWeb.Toolkits.WebsitePublisher.Gui.resources.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Gui.Windows/zh-CN/ZKWeb.Toolkits.WebsitePublisher.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Gui.Windows/zh-CN/ZKWeb.Toolkits.WebsitePublisher.resources.dll -------------------------------------------------------------------------------- /Tools/WebsitePublisher.Gui.Windows/zh-Hans/ZKWeb.Toolkits.WebsitePublisher.Gui.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/WebsitePublisher.Gui.Windows/zh-Hans/ZKWeb.Toolkits.WebsitePublisher.Gui.resources.dll -------------------------------------------------------------------------------- /Tools/project_creator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/Tools/project_creator.png -------------------------------------------------------------------------------- /VERSION.txt: -------------------------------------------------------------------------------- 1 | 3.0.0 -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Cmd/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.Toolkits.ProjectCreator.Cmd")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("37c8862a-13a0-4329-a982-8b2f3af4aa6b")] 20 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | node_modules 3 | dist 4 | build 5 | *.db-journal 6 | package-lock.json 7 | DatabaseUtils/bin 8 | DatabaseUtils/obj 9 | build 10 | ./src/assets/dbUtil 11 | .vs -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/DatabaseUtils/DatabaseUtils.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/DatabaseUtils/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace DatabaseUtils 8 | { 9 | static class Program 10 | { 11 | static void Main(string[] args) 12 | { 13 | if (args.Length==2) 14 | { 15 | var dbtype = args[0]; 16 | var connectionString = args[1]; 17 | DatabaseUtils.TestConnectionString(dbtype, connectionString); 18 | } 19 | else 20 | { 21 | throw new ArgumentException(); 22 | } 23 | 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/config/helpers.js: -------------------------------------------------------------------------------- 1 | var path = require("path"); 2 | var _root = path.resolve(__dirname, ".."); 3 | 4 | function root(args) { 5 | args = Array.prototype.slice.call(arguments, 0); 6 | return path.join.apply(path, [_root].concat(args)); 7 | } 8 | 9 | exports.root = root; 10 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/config/karma-dummy.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/config/karma-dummy.js -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/config/karma-test-shim.js: -------------------------------------------------------------------------------- 1 | Error.stackTraceLimit = Infinity; 2 | 3 | require("core-js/es6"); 4 | require("core-js/es7/reflect"); 5 | 6 | require("zone.js/dist/zone"); 7 | require("zone.js/dist/long-stack-trace-zone"); 8 | require("zone.js/dist/proxy"); 9 | require("zone.js/dist/sync-test"); 10 | require("zone.js/dist/jasmine-patch"); 11 | require("zone.js/dist/async-test"); 12 | require("zone.js/dist/fake-async-test"); 13 | 14 | var appContext = require.context("../src", true, /\.spec\.ts/); 15 | 16 | appContext.keys().forEach(appContext); 17 | 18 | var testing = require("@angular/core/testing"); 19 | var browser = require("@angular/platform-browser-dynamic/testing"); 20 | 21 | testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting()); 22 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/config/webpack.dev.js: -------------------------------------------------------------------------------- 1 | var webpackMerge = require("webpack-merge"); 2 | var ExtractTextPlugin = require("extract-text-webpack-plugin"); 3 | var commonConfig = require("./webpack.common.js"); 4 | var helpers = require("./helpers"); 5 | 6 | module.exports = webpackMerge(commonConfig, { 7 | devtool: "cheap-module-source-map", 8 | 9 | output: { 10 | path: helpers.root("dist"), 11 | publicPath: "./", 12 | filename: "[name].js", 13 | chunkFilename: "[id].chunk.js" 14 | }, 15 | 16 | plugins: [ 17 | new ExtractTextPlugin("[name].css") 18 | ], 19 | 20 | devServer: { 21 | historyApiFallback: true, 22 | stats: "minimal" 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/config/webpack.test.js: -------------------------------------------------------------------------------- 1 | var helpers = require("./helpers"); 2 | 3 | module.exports = { 4 | devtool: "inline-source-map", 5 | 6 | resolve: { 7 | extensions: [".ts", ".js"] 8 | }, 9 | 10 | externals: { sqlite3: "commonjs sqlite3" }, 11 | 12 | module: { 13 | loaders: [ 14 | { 15 | test: /\.ts$/, 16 | loaders: ["awesome-typescript-loader", "angular2-template-loader"] 17 | }, 18 | { 19 | test: /\.html$/, 20 | loader: "html-loader" 21 | 22 | }, 23 | { 24 | test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/, 25 | loader: "null" 26 | }, 27 | { 28 | test: /\.css$/, 29 | include: helpers.root("src", "app"), 30 | loader: "raw-loader" 31 | } 32 | ] 33 | }, 34 | 35 | target:"electron-renderer", 36 | }; 37 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/prebuild.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs-extra"); 2 | const path = require("path"); 3 | const childProcess = require("child_process"); 4 | const util = require("util"); 5 | const debuglog = util.debuglog("prebuild"); 6 | 7 | var commnad = "dotnet publish -c Release " + path.join(".", "DatabaseUtils", "DatabaseUtils.csproj"); 8 | var from = path.join(".", "DatabaseUtils", "bin", "Release", "netcoreapp3.0","publish"); 9 | var to = path.join(".", "src", "assets","dbUtil"); 10 | 11 | childProcess.exec(commnad, 12 | (error, stdout) => { 13 | if (!error) { 14 | debuglog("build success"); 15 | fs.copy(from, to, function (err) { 16 | if (err) { 17 | return debuglog(err); 18 | } else { 19 | debuglog("complete!"); 20 | } 21 | }); 22 | } else { 23 | debuglog(error); 24 | } 25 | }); 26 | 27 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/publish.js: -------------------------------------------------------------------------------- 1 | /*import { request } from "http"; 2 | 3 | "use strict"; 4 | var packager = require("electron-packager"); 5 | var path=require("path"); 6 | 7 | var options = { 8 | "dir": "./", 9 | "app-copyright": "魂祭心", 10 | "app-version": "1.0.0", 11 | "asar": false, 12 | "icon": "./src/assets/icon.ico", 13 | "name": "Zkweb Project Creator", 14 | "out": "./build", 15 | "overwrite": true, 16 | "prune": false, 17 | "version": "1.0.0", 18 | "ignore":function(str){ 19 | //--ignore=\"(src|config|.gitignore|build|.cs|.pdb|node_modules|prebuild.js|readme.md|tsconfig.json|tslint.json|package-lock.json 20 | var p= path.parse('/home/user/dir/file.txt'); 21 | ignorePath(p,"src"); 22 | ignorePath(p,"src"); 23 | } 24 | }; 25 | 26 | function keep(path){ 27 | 28 | } 29 | 30 | function ignorePath(path,word){ 31 | return path.indexOf(key)!==-1; 32 | } 33 | 34 | function ignoreFile(path,){ 35 | 36 | } 37 | 38 | function ignoreExtend(path,ext){ 39 | 40 | } 41 | 42 | packager(options, function done_callback(err, appPaths) { 43 | 44 | });*/ -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/readme.md: -------------------------------------------------------------------------------- 1 | # zkweb creator 2 | 3 | ## build 4 | 5 | cd ./ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui 6 | 7 | npm install 8 | 9 | npm run build 10 | 11 | ## package 12 | 13 | npm run packagewin 14 | 15 | npm run packagelinux 16 | 17 | npm run packagemac 18 | 19 | 应用程序会生成在build目录下,需要移动到Tools目录里面。 20 | 21 | 编译打包后生成的可执行文件,当前存在的两个问题: 22 | 23 | 1. 与之前的gui工具相同,这个工具也需要放在Tools目录下面。 24 | 25 | 2. 在ubuntu系统中,双击执行拿不到shell的PATH,因而需要shell启动程序中 ./zkweb 26 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/app/PluginCollection.ts: -------------------------------------------------------------------------------- 1 | export class PluginCollection { 2 | 3 | public PrependPlugins: string[]; 4 | public AppendPlugins: string[]; 5 | public SupportedORM: string[]; 6 | 7 | public PluginCollection() { 8 | this.PrependPlugins = []; 9 | this.AppendPlugins = []; 10 | this.SupportedORM = []; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | .btnCenter{ 2 | display: table; 3 | width: auto; 4 | margin-left: auto; 5 | margin-right: auto; 6 | } 7 | .form-group{ 8 | margin-bottom: 0.3rem; 9 | } 10 | 11 | .row-margin-top { margin-top: 10px; } -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/app/dataBaseConnection/baseConnection.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface IBaseConnection { 3 | 4 | ip: string; 5 | port: number; 6 | user: string; 7 | password: string; 8 | connectionString: string; 9 | 10 | parser(): void; 11 | testConnect(messageEvent: any): void; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/app/dataBaseConnection/mongoConnection.ts: -------------------------------------------------------------------------------- 1 | import { TranslateService } from "@ngx-translate/core"; 2 | import { IBaseConnection } from "./baseConnection"; 3 | const MongoClient = require("mongodb").MongoClient; 4 | 5 | export class MongoConnection implements IBaseConnection { 6 | 7 | public ip: string; 8 | public port: number; 9 | public user: string; 10 | public password: string; 11 | public connectionString: string; 12 | 13 | constructor(public translateService: TranslateService, connectonString: string) { 14 | this.connectionString = connectonString; 15 | } 16 | parser(): void { 17 | } 18 | testConnect(messageEvent: any): void { 19 | MongoClient.connect(this.connectionString, (err: any) => { 20 | if (err) { 21 | this.translateService.get("dataBaseTestFail", {}).subscribe((res: string) => { 22 | messageEvent.emit("error", res); 23 | }); 24 | } else { 25 | messageEvent.emit("info", "success"); 26 | } 27 | }); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/assets/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/assets/icon.icns -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/assets/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/assets/icon.ico -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/assets/images/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/assets/images/.gitkeep -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/assets/sass/_bootstrap-custom.scss: -------------------------------------------------------------------------------- 1 | $grid-gutter-width-base: 10px !default; 2 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/assets/sass/_bootstrap.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.0.0-beta (https://getbootstrap.com) 3 | * Copyright 2011-2017 The Bootstrap Authors 4 | * Copyright 2011-2017 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | // Comment out the files you don't need 9 | @import "functions"; 10 | @import "variables"; 11 | @import "mixins"; 12 | @import "print"; 13 | @import "reboot"; 14 | @import "type"; 15 | @import "images"; 16 | @import "code"; 17 | @import "grid"; 18 | @import "tables"; 19 | @import "forms"; 20 | @import "buttons"; 21 | @import "transitions"; 22 | @import "dropdown"; 23 | @import "button-group"; 24 | @import "input-group"; 25 | @import "custom-forms"; 26 | @import "nav"; 27 | @import "navbar"; 28 | @import "card"; 29 | @import "breadcrumb"; 30 | @import "pagination"; 31 | @import "badge"; 32 | @import "jumbotron"; 33 | @import "alert"; 34 | @import "progress"; 35 | @import "media"; 36 | @import "list-group"; 37 | @import "close"; 38 | @import "modal"; 39 | @import "tooltip"; 40 | @import "popover"; 41 | @import "carousel"; 42 | @import "utilities"; 43 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/assets/sass/style.scss: -------------------------------------------------------------------------------- 1 | @import 'bootstrap-custom'; 2 | @import 'bootstrap'; 3 | 4 | html, body { 5 | height: 100%; 6 | margin: 0; 7 | } 8 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Loading... 9 | 10 | 11 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from "@angular/core"; 2 | import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; 3 | 4 | import { AppModule } from "./app/app.module"; 5 | 6 | if (process.env.ENV === "production") { 7 | enableProdMode(); 8 | } 9 | 10 | platformBrowserDynamic().bootstrapModule(AppModule); 11 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | import "core-js/es7/reflect"; 2 | import "zone.js/dist/zone"; 3 | import "zone.js/dist/zone-patch-electron"; 4 | 5 | if (process.env.ENV === "production") { 6 | // Production 7 | } else { 8 | // Development 9 | Error["stackTraceLimit"] = Infinity; 10 | require("zone.js/dist/long-stack-trace-zone"); 11 | } 12 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/src/vendor.ts: -------------------------------------------------------------------------------- 1 | // Angular 2 | import "@angular/common"; 3 | import "@angular/core"; 4 | import "@angular/http"; 5 | import "@angular/platform-browser"; 6 | import "@angular/platform-browser-dynamic"; 7 | 8 | // RxJS 9 | import "rxjs"; 10 | 11 | // Other vendors for example jQuery, Lodash or Bootstrap 12 | // You can import js, ts, css, sass, ... 13 | 14 | import "bootstrap"; 15 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Crossplatform.Gui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "sourceMap": true, 7 | "emitDecoratorMetadata": true, 8 | "experimentalDecorators": true, 9 | "suppressImplicitAnyIndexErrors": true, 10 | 11 | "removeComments": false, 12 | "preserveConstEnums": true, 13 | "noImplicitAny": true, 14 | "noImplicitReturns": true, 15 | "strictNullChecks": true, 16 | "noUnusedLocals": true, 17 | "noImplicitThis": true, 18 | "noUnusedParameters": true, 19 | "importHelpers": true, 20 | "noEmitHelpers": true, 21 | "pretty": true, 22 | "skipLibCheck": true 23 | }, 24 | "include": [ 25 | "src/app/**/*.ts" 26 | ], 27 | "exclude": [ 28 | "**/node_modules/*", 29 | "dist", 30 | "build", 31 | "src/app/**/*.spec.ts" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Gui/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Gui/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace ZKWeb.Toolkits.ProjectCreator.Gui 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(false); 16 | Application.Run(new MainForm()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Gui/Properties/Resources.zh-CN.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Gui/Properties/Resources.zh-CN.Designer.cs -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Gui/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ZKWeb.Toolkits.ProjectCreator.Gui.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Gui/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Gui/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Gui/icon.ico -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator.Gui/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.ProjectCreator/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.Toolkits.ProjectCreator")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("cefd9935-78aa-4af8-b4a3-6e188f11b88b")] 20 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher.Cmd/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.Toolkits.WebsitePublisher.Cmd")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("c2641eea-6a1c-4fa4-8149-b57169c4c2b4")] 20 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher.Gui/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher.Gui/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace ZKWeb.Toolkits.WebsitePublisher.Gui 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new MainForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher.Gui/Properties/Resources.zh-CN.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher.Gui/Properties/Resources.zh-CN.Designer.cs -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher.Gui/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher.Gui/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkweb-framework/ZKWeb/6ddd2ef8bbb448b3609f9eaaa953cf6be2b45acd/ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher.Gui/icon.ico -------------------------------------------------------------------------------- /ZKWeb.Toolkits/ZKWeb.Toolkits.WebsitePublisher/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.Toolkits.WebsitePublisher")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("7a73d1f0-8266-4bf3-9518-84e8af74ef56")] 20 | -------------------------------------------------------------------------------- /ZKWeb/NuGet.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/ApplicationTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Ioc; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWeb.Tests 5 | { 6 | [Tests] 7 | class ApplicationTest 8 | { 9 | public abstract class Base { } 10 | public class A : Base { } 11 | public class B : Base { } 12 | 13 | public void OverrideIoc() 14 | { 15 | Assert.Equals(Application.Ioc.Resolve(IfUnresolved.ReturnDefault), null); 16 | using (Application.OverrideIoc()) 17 | { 18 | Application.Ioc.Register(); 19 | Assert.IsTrue(Application.Ioc.Resolve() is A); 20 | using (Application.OverrideIoc()) 21 | { 22 | Application.Ioc.Unregister(); 23 | Application.Ioc.Register(); 24 | Assert.IsTrue(Application.Ioc.Resolve() is B); 25 | } 26 | Assert.IsTrue(Application.Ioc.Resolve() is A); 27 | } 28 | Assert.Equals(Application.Ioc.Resolve(IfUnresolved.ReturnDefault), null); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Serialize/JsonNetTest.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using ZKWeb.Localize; 5 | using ZKWebStandard.Testing; 6 | 7 | namespace ZKWeb.Tests.Serialize 8 | { 9 | [Tests] 10 | class JsonNetTest 11 | { 12 | public void All() 13 | { 14 | // Serialize T 15 | var translated = new T("__OriginalString"); 16 | Assert.Equals(JsonConvert.SerializeObject(translated), 17 | JsonConvert.SerializeObject(translated.ToString())); 18 | // Avoid add items to exist collection 19 | var data = JsonConvert.DeserializeObject("{ Array: [ 4, 5, 6 ] }"); 20 | Assert.IsTrueWith(data.Array.SequenceEqual(new[] { 4, 5, 6 }), data); 21 | } 22 | 23 | class TestData 24 | { 25 | public IList Array { get; set; } 26 | public TestData() 27 | { 28 | Array = new List() { 1, 2, 3 }; 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Server/WebsiteConfigManagerTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Server; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWeb.Tests.Server 5 | { 6 | [Tests] 7 | class WebsiteConfigManagerTest 8 | { 9 | public void All() 10 | { 11 | var configManager = Application.Ioc.Resolve(); 12 | Assert.IsTrue(configManager.WebsiteConfig != null); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Templating/DynamicContents/TemplateWidgetExtensionsTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Templating.DynamicContents; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWeb.Tests.Templating.DynamicContents 5 | { 6 | [Tests] 7 | class TemplateWidgetExtensionsTest 8 | { 9 | public void GetCacheKey() 10 | { 11 | var widget = new TemplateWidget("__test"); 12 | Assert.Equals(widget.GetCacheKey(), "__test"); 13 | widget = new TemplateWidget("__test", new { a = 1 }); 14 | Assert.Equals(widget.GetCacheKey(), "__test{\"a\":1}"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Templating/DynamicContents/TemplateWidgetInfoExtensionsTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Templating.DynamicContents; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWeb.Tests.Templating.DynamicContents 5 | { 6 | [Tests] 7 | class TemplateWidgetInfoExtensionsTest 8 | { 9 | public void GetCacheIsolationPolicyNames() 10 | { 11 | var info = new TemplateWidgetInfo(); 12 | info.CacheBy = "Url,Locale"; 13 | var policyNames = info.GetCacheIsolationPolicyNames(); 14 | Assert.Equals(policyNames.Count, 3); 15 | Assert.Equals(policyNames[0], "Url"); 16 | Assert.Equals(policyNames[1], "Locale"); 17 | Assert.Equals(policyNames[2], "Device"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Templating/TemplateTags/HtmlLangTest.cs: -------------------------------------------------------------------------------- 1 | using DotLiquid; 2 | using ZKWebStandard.Utils; 3 | using ZKWebStandard.Testing; 4 | 5 | namespace ZKWeb.Tests.Templating.TemplateTags 6 | { 7 | [Tests] 8 | class HtmlLangTest 9 | { 10 | public void Render() 11 | { 12 | LocaleUtils.SetThreadLanguage("zh-CN"); 13 | Assert.Equals(Template.Parse("{% html_lang %}").Render(), "zh-CN"); 14 | LocaleUtils.SetThreadLanguage("en-US"); 15 | Assert.Equals(Template.Parse("{% html_lang %}").Render(), "en-US"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Templating/TemplateTags/RawHtmlTest.cs: -------------------------------------------------------------------------------- 1 | using DotLiquid; 2 | using ZKWeb.Templating; 3 | using ZKWebStandard.Testing; 4 | 5 | namespace ZKWeb.Tests.Templating.TemplateTags 6 | { 7 | [Tests] 8 | class RawHtmlTest 9 | { 10 | public void Render() 11 | { 12 | var templateManager = Application.Ioc.Resolve(); 13 | Assert.Equals( 14 | Template.Parse("{% raw_html html %}{{ html }}").Render( 15 | templateManager.CreateHash(new { html = "'\"test" })), 16 | "'\"test<a>'"test</a>"); 17 | Assert.Equals(Template.Parse("{% raw_html \"abc\" %}").Render(), "abc"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Tests.ZKWeb.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net461;netstandard2.0 4 | true 5 | Tests.ZKWeb 6 | false 7 | false 8 | false 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | $(DefineConstants);NETCORE 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Web/ActionResults/ImageResultTest.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.IO; 3 | using ZKWeb.Web.ActionResults; 4 | using ZKWebStandard.Testing; 5 | using ZKWebStandard.Web.Mock; 6 | 7 | namespace ZKWeb.Tests.Web.ActionResults 8 | { 9 | [Tests] 10 | class ImageResultTest 11 | { 12 | public void WriteResponse() 13 | { 14 | var image = new Bitmap(123, 456); 15 | var result = new ImageResult(image); 16 | var contextMock = new HttpContextMock(); 17 | result.WriteResponse(contextMock.response); 18 | contextMock.response.body.Seek(0, SeekOrigin.Begin); 19 | Assert.Equals(contextMock.response.StatusCode, 200); 20 | Assert.Equals(contextMock.response.ContentType, "image/jpeg"); 21 | var imageVerify = Image.FromStream(contextMock.response.body); 22 | Assert.Equals(imageVerify.Width, 123); 23 | Assert.Equals(imageVerify.Height, 456); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Web/ActionResults/JsonResultTest.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.IO; 3 | using ZKWeb.Web.ActionResults; 4 | using ZKWebStandard.Testing; 5 | using ZKWebStandard.Web.Mock; 6 | 7 | namespace ZKWeb.Tests.Web.ActionResults 8 | { 9 | [Tests] 10 | class JsonResultTest 11 | { 12 | public void WriteResponse() 13 | { 14 | var formats = new[] { Formatting.None, Formatting.Indented }; 15 | foreach (var format in formats) 16 | { 17 | var result = new JsonResult(new { a = 1 }, format); 18 | var contextMock = new HttpContextMock(); 19 | var exceptedResult = JsonConvert.SerializeObject(new { a = 1 }, format); 20 | result.WriteResponse(contextMock.response); 21 | Assert.Equals(contextMock.response.StatusCode, 200); 22 | Assert.Equals(contextMock.response.ContentType, result.ContentType); 23 | Assert.Equals(contextMock.response.GetContentsFromBody(), exceptedResult); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Web/ActionResults/PlainResultTest.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using ZKWeb.Web.ActionResults; 3 | using ZKWebStandard.Testing; 4 | using ZKWebStandard.Web.Mock; 5 | 6 | namespace ZKWeb.Tests.Web.ActionResults 7 | { 8 | [Tests] 9 | class PlainResultTest 10 | { 11 | public void WriteResponse() 12 | { 13 | var result = new PlainResult("test contents"); 14 | var contextMock = new HttpContextMock(); 15 | result.WriteResponse(contextMock.response); 16 | Assert.Equals(contextMock.response.StatusCode, 200); 17 | Assert.Equals(contextMock.response.ContentType, result.ContentType); 18 | Assert.Equals(contextMock.response.GetContentsFromBody(), "test contents"); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Web/ActionResults/RedirectResultTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Web.ActionResults; 2 | using ZKWebStandard.Testing; 3 | using ZKWebStandard.Web.Mock; 4 | 5 | namespace ZKWeb.Tests.Web.ActionResults 6 | { 7 | [Tests] 8 | class RedirectResultTest 9 | { 10 | public void WriteResponse() 11 | { 12 | var url = "test_url"; 13 | var result = new RedirectResult(url); 14 | var responseMock = new HttpResponseMock(null); 15 | result.WriteResponse(responseMock); 16 | Assert.Equals(responseMock.lastRedirect, url); 17 | Assert.IsTrue(!responseMock.lastRedirectIsPermanent); 18 | 19 | result = new RedirectResult(url, true); 20 | responseMock = new HttpResponseMock(null); 21 | result.WriteResponse(responseMock); 22 | Assert.Equals(responseMock.lastRedirect, url); 23 | Assert.IsTrue(responseMock.lastRedirectIsPermanent); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWeb/Web/HttpRequestHandlers/AddVersionHeaderHandlerTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Web.HttpRequestHandlers; 2 | using ZKWebStandard.Testing; 3 | using ZKWebStandard.Web; 4 | using ZKWebStandard.Web.Mock; 5 | 6 | namespace ZKWeb.Tests.Web.HttpRequestHandlers 7 | { 8 | [Tests] 9 | class AddVersionHeaderHandlerTest 10 | { 11 | public void OnRequest() 12 | { 13 | var handler = new AddVersionHeaderHandler(); 14 | using (HttpManager.OverrideContext("", "GET")) 15 | { 16 | var response = (HttpResponseMock)HttpManager.CurrentContext.Response; 17 | handler.OnRequest(); 18 | Assert.Equals(response.headers["X-ZKWeb-Version"][0], Application.FullVersion); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Collections/HtmlStringTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Collection; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWebStandard.Tests.Collections 5 | { 6 | [Tests] 7 | class HtmlStringTest 8 | { 9 | public void Encode() 10 | { 11 | Assert.Equals(HtmlString.Encode("asd'\"<>").ToString(), "asd'"<>"); 12 | } 13 | 14 | public void Decode() 15 | { 16 | Assert.Equals(HtmlString.Encode("asd'\"<>").Decode(), "asd'\"<>"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Collections/LazyCacheTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Collections; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWebStandard.Tests.Collections 5 | { 6 | [Tests] 7 | class LazyCacheTest 8 | { 9 | public void All() 10 | { 11 | var createCount = 0; 12 | var cache = LazyCache.Create(() => { createCount += 1; return new object(); }); 13 | 14 | Assert.IsTrue(!cache.IsValueCreated); 15 | var a = cache.Value; 16 | var b = cache.Value; 17 | Assert.IsTrue(cache.IsValueCreated); 18 | Assert.Equals(createCount, 1); 19 | Assert.IsTrue(object.ReferenceEquals(a, b)); 20 | 21 | cache.Reset(); 22 | Assert.IsTrue(!cache.IsValueCreated); 23 | a = cache.Value; 24 | b = cache.Value; 25 | Assert.IsTrue(cache.IsValueCreated); 26 | Assert.Equals(createCount, 2); 27 | Assert.IsTrue(object.ReferenceEquals(a, b)); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Collections/SimpleDisposableTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Collections; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWebStandard.Tests.Collections 5 | { 6 | [Tests] 7 | class SimpleDisposableTest 8 | { 9 | public void All() 10 | { 11 | // Dispose many times 12 | int count = 0; 13 | var obj = new SimpleDisposable(() => count += 1); 14 | Assert.Equals(count, 0); 15 | obj.Dispose(); 16 | Assert.Equals(count, 1); 17 | #pragma warning disable S3966 // Objects should not be disposed more than once 18 | obj.Dispose(); 19 | #pragma warning restore S3966 // Objects should not be disposed more than once 20 | Assert.Equals(count, 1); 21 | // With using directive 22 | count = 0; 23 | using (new SimpleDisposable(() => count += 1)) 24 | { 25 | // Do nothing 26 | } 27 | Assert.Equals(count, 1); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Extensions/ByteArrayExtensionsTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Extensions; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWebStandard.Tests.Extensions 5 | { 6 | [Tests] 7 | class ByteArrayExtensionsTest 8 | { 9 | public void ToHex() 10 | { 11 | var bytes = new byte[] { 1, 0x12, 0x13 }; 12 | Assert.Equals(bytes.ToHex(), "011213"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Extensions/DecimalExtensionsTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Extensions; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWebStandard.Tests.Extensions 5 | { 6 | [Tests] 7 | class DecimalExtensionsTest 8 | { 9 | public void Normalize() 10 | { 11 | Assert.Equals((12.3000M).Normalize().ToString(), "12.3"); 12 | Assert.Equals((0.0001M).Normalize().ToString(), "0.0001"); 13 | Assert.Equals((0.000001000M).Normalize().ToString(), "0.000001"); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Extensions/ExceptionExtensionsTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ZKWebStandard.Extensions; 3 | using ZKWebStandard.Testing; 4 | 5 | namespace ZKWebStandard.Tests.Extensions 6 | { 7 | [Tests] 8 | class ExceptionExtensionsTest 9 | { 10 | public void ToDetailedString() 11 | { 12 | var ex = new ArgumentException("qwert", new ArgumentException("inner qwert")); 13 | var str = ex.ToDetailedString(); 14 | Assert.IsTrueWith(str.Contains("inner qwert"), str); 15 | } 16 | 17 | public void TestSummaryString() 18 | { 19 | var ex = new ArgumentException("qwert", new ArgumentException("inner qwert")); 20 | var str = ex.ToSummaryString(); 21 | Assert.IsTrueWith(str.Contains("inner qwert"), str); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Extensions/ISetExtensionsTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using ZKWebStandard.Extensions; 4 | using ZKWebStandard.Testing; 5 | 6 | namespace ZKWebStandard.Tests.Extensions 7 | { 8 | [Tests] 9 | #pragma warning disable S101 // Types should be named in camel case 10 | class ISetExtensionsTest 11 | { 12 | #pragma warning restore S101 // Types should be named in camel case 13 | public void AddRange() 14 | { 15 | var set = new SortedSet(); 16 | Assert.Equals(set.AddRange(new[] { 1, 2, 3 }), 3); 17 | Assert.IsTrueWith(set.SequenceEqual(new[] { 1, 2, 3 }), set); 18 | Assert.Equals(set.AddRange(new[] { 3, 4, 5 }), 2); 19 | Assert.IsTrueWith(set.SequenceEqual(new[] { 1, 2, 3, 4, 5 }), set); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Extensions/MethodInfoExtensionsTest.cs: -------------------------------------------------------------------------------- 1 | using System.FastReflection; 2 | using ZKWebStandard.Extensions; 3 | using ZKWebStandard.Testing; 4 | 5 | namespace ZKWebStandard.Tests.Extensions 6 | { 7 | [Tests] 8 | class MethodInfoExtensionsTest 9 | { 10 | public void GetFullName() 11 | { 12 | var methodInfo = this.GetType().FastGetMethod("GetFullName"); 13 | var fullname = methodInfo.GetFullName(); 14 | Assert.Equals(fullname, "ZKWebStandard.Tests.Extensions.MethodInfoExtensionsTest.GetFullName"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Extensions/StreamExtensionTest.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Text; 3 | using ZKWebStandard.Extensions; 4 | using ZKWebStandard.Testing; 5 | 6 | namespace ZKWebStandard.Tests.Extensions 7 | { 8 | [Tests] 9 | class StreamExtensionTest 10 | { 11 | public void CopyTo() 12 | { 13 | using (var source = new MemoryStream(Encoding.UTF8.GetBytes("0123456789"))) 14 | using (var desitination = new MemoryStream()) 15 | { 16 | source.CopyTo(desitination, 1024, 1, 3); 17 | desitination.Seek(0, SeekOrigin.Begin); 18 | Assert.Equals(new StreamReader(desitination).ReadToEnd(), "123"); 19 | 20 | desitination.Seek(0, SeekOrigin.Begin); 21 | source.CopyTo(desitination, 1024, 7, 5); 22 | desitination.Seek(0, SeekOrigin.Begin); 23 | Assert.Equals(new StreamReader(desitination).ReadToEnd(), "789"); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Tests.ZKWebStandard.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net461;netstandard2.0 4 | true 5 | Tests.ZKWebStandard 6 | false 7 | false 8 | false 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | $(DefineConstants);NETCORE 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Utils/ExpressionUtilsTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ZKWebStandard.Utils; 3 | using ZKWebStandard.Testing; 4 | 5 | namespace ZKWebStandard.Tests.Utils 6 | { 7 | [Tests] 8 | class ExpressionUtilsTest 9 | { 10 | public void MakeMemberEqualiventExpression() 11 | { 12 | var expression = ExpressionUtils.MakeMemberEqualiventExpression>("Count", 3); 13 | var method = expression.Compile(); 14 | Assert.Equals(method(new[] { 1, 2, 3 }), true); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Utils/FileUtilsTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Utils; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWebStandard.Tests.Utils 5 | { 6 | [Tests] 7 | class FileUtilsTest 8 | { 9 | public void GetSizeDisplayName() 10 | { 11 | Assert.Equals(FileUtils.GetSizeDisplayName(0), "0Bytes"); 12 | Assert.Equals(FileUtils.GetSizeDisplayName(1023), "1023Bytes"); 13 | Assert.Equals(FileUtils.GetSizeDisplayName(1024), "1KB"); 14 | Assert.Equals(FileUtils.GetSizeDisplayName((int)(1024 * 1.5M)), "1.5KB"); 15 | Assert.Equals(FileUtils.GetSizeDisplayName(1048576), "1MB"); 16 | Assert.Equals(FileUtils.GetSizeDisplayName((int)(1048576 * 1.5M)), "1.5MB"); 17 | Assert.Equals(FileUtils.GetSizeDisplayName(1073741824), "1GB"); 18 | Assert.Equals(FileUtils.GetSizeDisplayName((int)(1073741824 * 1.5M)), "1.5GB"); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Utils/GuidUtilsTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ZKWebStandard.Testing; 3 | using ZKWebStandard.Utils; 4 | 5 | namespace ZKWebStandard.Tests.Utils 6 | { 7 | [Tests] 8 | class GuidUtilsTest 9 | { 10 | public void SequentialGuid() 11 | { 12 | var a = GuidUtils.SequentialGuid(new DateTime(2016, 8, 8)); 13 | var b = GuidUtils.SequentialGuid(new DateTime(2016, 8, 9)); 14 | Assert.IsTrue(a != Guid.Empty); 15 | Assert.IsTrue(b != Guid.Empty); 16 | Assert.IsTrueWith(string.Compare(a.ToString(), b.ToString()) < 0, new { a, b }); 17 | } 18 | 19 | public void SecureSequentialGuid() 20 | { 21 | var a = GuidUtils.SecureSequentialGuid(new DateTime(2016, 8, 8)); 22 | var b = GuidUtils.SecureSequentialGuid(new DateTime(2016, 8, 9)); 23 | Assert.IsTrue(a != Guid.Empty); 24 | Assert.IsTrue(b != Guid.Empty); 25 | Assert.IsTrueWith(string.Compare(a.ToString(), b.ToString()) < 0, new { a, b }); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Utils/MimeUtilsTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Testing; 2 | using ZKWebStandard.Utils; 3 | 4 | namespace ZKWebStandard.Tests.Utils 5 | { 6 | [Tests] 7 | class MimeUtilsTest 8 | { 9 | public void GetMimeType() 10 | { 11 | Assert.Equals(MimeUtils.GetMimeType("1.html"), "text/html"); 12 | Assert.Equals(MimeUtils.GetMimeType("1.vbs"), "text/vbscript"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Utils/NetworkUtilsTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Testing; 2 | using ZKWebStandard.Utils; 3 | 4 | namespace ZKWebStandard.Tests.Utils 5 | { 6 | [Tests] 7 | class NetworkUtilsTest 8 | { 9 | public void GetClientIpAddress() 10 | { 11 | // return value is unspecificed 12 | NetworkUtils.GetClientIpAddress(); 13 | } 14 | 15 | public void GetHostIpAddress() 16 | { 17 | // return value is unspecificed 18 | NetworkUtils.GetHostIpAddress(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Utils/PlatformUtilsTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Testing; 2 | using ZKWebStandard.Utils; 3 | 4 | namespace ZKWebStandard.Tests.Utils 5 | { 6 | [Tests] 7 | class PlatformUtilsTest 8 | { 9 | public void Check() 10 | { 11 | Assert.IsTrue(PlatformUtils.RunningOnUnix() != PlatformUtils.RunningOnWindows()); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Utils/SystemUtilsTest.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Utils; 2 | using ZKWebStandard.Testing; 3 | 4 | namespace ZKWebStandard.Tests.Utils 5 | { 6 | [Tests] 7 | class SystemUtilsTest 8 | { 9 | public void GetUsedMemoryBytes() 10 | { 11 | var value = SystemUtils.GetUsedMemoryBytes(); 12 | Assert.IsTrueWith(value > 0, value); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ZKWeb/Tests.ZKWebStandard/Web/HttpManagerTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ZKWebStandard.Testing; 3 | using ZKWebStandard.Web; 4 | 5 | namespace ZKWebStandard.Tests.Web 6 | { 7 | [Tests] 8 | class HttpManagerTest 9 | { 10 | public void OverrideContext() 11 | { 12 | Assert.Equals(HttpManager.CurrentContext.Request.Path, "/"); 13 | using (HttpManager.OverrideContext("a", "GET")) 14 | { 15 | using (HttpManager.OverrideContext("b", "GET")) 16 | { 17 | Assert.Equals(HttpManager.CurrentContext.Request.Path, "/b"); 18 | } 19 | Assert.Equals(HttpManager.CurrentContext.Request.Path, "/a"); 20 | } 21 | Assert.Equals(HttpManager.CurrentContext.Request.Path, "/"); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Console/App_Data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !config.json 3 | !.gitignore -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Console/App_Data/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ORM": "EFCore", 3 | "Database": "SQLite", 4 | "ConnectionString": "Data Source={{App_Data}}/test.db;", 5 | "PluginDirectories": [ "App_Data" ], 6 | "Plugins": [] 7 | } 8 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Console/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.Console")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("120322fa-d4bb-41bd-b638-4cd7a2d83b18")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.AspNet/AspNetWebsiteStopper.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using ZKWeb.Web; 3 | 4 | namespace ZKWeb.Hosting.AspNet 5 | { 6 | /// 7 | /// Asp.Net website stopper
8 | /// Asp.Net网站停止器
9 | ///
10 | internal class AspNetWebsiteStopper : IWebsiteStopper 11 | { 12 | /// 13 | /// Unload app doamin
14 | /// 卸载AppDomain
15 | ///
16 | public void StopWebsite() 17 | { 18 | HttpRuntime.UnloadAppDomain(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.AspNet/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.Hosting.AspNet")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("016e4545-2a2e-482a-b230-23400677dd18")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.AspNet/ZKWeb.Hosting.AspNet.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net461 4 | true 5 | ZKWeb.Hosting.AspNet 6 | ZKWeb.Hosting.AspNet 7 | false 8 | false 9 | false 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.AspNetCore/CoreHttpResponseEndException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWeb.Hosting.AspNetCore 4 | { 5 | #pragma warning disable S3925 // "ISerializable" should be implemented correctly 6 | /// 7 | /// Reponse end exception for Asp.Net Core
8 | /// Asp.Net Core使用的代表请求结束的例外
9 | ///
10 | public class CoreHttpResponseEndException : Exception { } 11 | #pragma warning restore S3925 // "ISerializable" should be implemented correctly 12 | } 13 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.AspNetCore/CoreWebsiteStopper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNetCore.Hosting; 3 | using ZKWeb.Web; 4 | using ZKWebStandard.Ioc; 5 | 6 | namespace ZKWeb.Hosting.AspNetCore 7 | { 8 | /// 9 | /// Asp.Net Core website stopper
10 | /// Asp.Net Core的网站停止器
11 | ///
12 | internal class CoreWebsiteStopper : IWebsiteStopper 13 | { 14 | /// 15 | /// Stop application
16 | /// 停止应用程序
17 | ///
18 | public void StopWebsite() 19 | { 20 | if (Application.Unloadable) 21 | { 22 | Application.Unload(); 23 | } 24 | else 25 | { 26 | var lifetime = Application.Ioc.Resolve(IfUnresolved.ReturnDefault); 27 | lifetime?.StopApplication(); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.AspNetCore/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.Hosting.AspNetCore")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("e03517d7-a2c7-4b28-b57b-9d770ca4edc6")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.AspNetCore/ServiceProviderProxy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ZKWebStandard.Ioc; 3 | using ZKWebStandard.Ioc.Extensions; 4 | 5 | namespace ZKWeb.Hosting.AspNetCore 6 | { 7 | /// 8 | /// Serivce provider that always use Application.Ioc as upstream for reloading support
9 | /// 服务提供器的代理类,总是使用 Application.Ioc 作为上游,用于支持重新加载应用
10 | ///
11 | public class ServiceProviderProxy : IServiceProvider 12 | { 13 | private volatile IContainer _container; 14 | private volatile IServiceProvider _upstream; 15 | 16 | /// 17 | /// Resolve service
18 | /// 解决服务
19 | ///
20 | public object GetService(Type serviceType) 21 | { 22 | var container = Application.Ioc; 23 | if (container != _container) 24 | { 25 | _upstream = container.AsServiceProvider(); 26 | _container = container; 27 | } 28 | return _upstream.GetService(serviceType); 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.Owin/OwinHttpResponseEndException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWeb.Hosting.Owin 4 | { 5 | #pragma warning disable S3925 // "ISerializable" should be implemented correctly 6 | /// 7 | /// Http response end exception for Owin
8 | /// Owin中表示Http回应结束的例外
9 | ///
10 | public class OwinHttpResponseEndException : Exception { } 11 | #pragma warning restore S3925 // "ISerializable" should be implemented correctly 12 | } -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.Owin/OwinWebsiteStopper.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using ZKWeb.Web; 3 | 4 | namespace ZKWeb.Hosting.Owin 5 | { 6 | /// 7 | /// Owin website stopper
8 | /// Owin的网站停止器
9 | ///
10 | public class OwinWebsiteStopper : IWebsiteStopper 11 | { 12 | /// 13 | /// Unload app domain
14 | /// 卸载AppDomain
15 | ///
16 | public void StopWebsite() 17 | { 18 | // Owin didn't provide interface for stopping website 19 | // Just use same method from Asp.Net 20 | HttpRuntime.UnloadAppDomain(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.Hosting.Owin/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.Hosting.Owin")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("668dbf52-038f-4400-a484-0fd2d92a3182")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.Dapper/IDapperEntityMapping.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | 5 | namespace ZKWeb.ORM.Dapper 6 | { 7 | /// 8 | /// The non-generic interface for entity mapping
9 | /// 非泛型的实体映射定义的接口
10 | ///
11 | public interface IDapperEntityMapping 12 | { 13 | /// 14 | /// The entity type
15 | /// 实体类型
16 | ///
17 | Type EntityType { get; } 18 | /// 19 | /// The table name
20 | /// 表名
21 | ///
22 | string TableName { get; } 23 | /// 24 | /// Id member
25 | /// Id成员
26 | ///
27 | MemberInfo IdMember { get; } 28 | /// 29 | /// Ordinary members, not releated to other entities
30 | /// 普通成员, 与其他实体无关的成员
31 | ///
32 | IEnumerable OrdinaryMembers { get; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.Dapper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.ORM.Dapper")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("9480bbc6-622f-4386-8652-c5977634e9cb")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.Dapper/PropertyResolver/ZKWebPropertyResolver.cs: -------------------------------------------------------------------------------- 1 | using Dapper.FluentMap.Dommel.Resolvers; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | 5 | namespace ZKWeb.ORM.Dapper.PropertyResolver 6 | { 7 | /// 8 | /// Replace dommel property resolver
9 | /// don't filter complex types
10 | /// 替换dommel的属性解决器
11 | /// 不过滤复杂类型
12 | ///
13 | public class ZKWebPropertyResolver : DommelPropertyResolver 14 | { 15 | /// 16 | /// Don't filter complex types
17 | /// 不过滤复杂类型
18 | ///
19 | protected override IEnumerable FilterComplexTypes(IEnumerable properties) 20 | { 21 | return properties; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.Dapper/TypeHandlers/GuidTypeHandler.cs: -------------------------------------------------------------------------------- 1 | using Dapper; 2 | using System; 3 | using System.Data; 4 | using ZKWebStandard.Extensions; 5 | 6 | namespace ZKWeb.ORM.Dapper.TypeHandlers 7 | { 8 | /// 9 | /// Handle guid type
10 | /// It's needed because mysql use varchar for guid
11 | /// 处理guid类型
12 | ///
13 | ///
14 | public class GuidTypeHandler : SqlMapper.TypeHandler 15 | { 16 | /// 17 | /// Convert value to guid field
18 | /// 转换值到guid字段
19 | ///
20 | public override Guid Parse(object value) 21 | { 22 | return value.ConvertOrDefault(); 23 | } 24 | 25 | /// 26 | /// Convert guid field to value
27 | /// 转换值到guid字段
28 | ///
29 | public override void SetValue(IDbDataParameter parameter, Guid value) 30 | { 31 | if (parameter.DbType == DbType.Guid) 32 | { 33 | parameter.Value = value; 34 | } 35 | else 36 | { 37 | parameter.Value = value.ToString(); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.EFCore/EFCoreExtraConfigKeys.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.ORM.EFCore 2 | { 3 | /// 4 | /// Extra website configuration keys for EFCore
5 | /// EFCore使用的网站的附加配置键
6 | ///
7 | public static class EFCoreExtraConfigKeys 8 | { 9 | /// 10 | /// Disable database auto migration for EFCore
11 | /// 禁用EFCore的数据库自动迁移
12 | ///
13 | public const string DisableEFCoreDatabaseAutoMigration = "ZKWeb.DisableEFCoreDatabaseAutoMigration"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.EFCore/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.ORM.EFCore")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("8b8b427d-a079-4145-b5d0-e726a5a0ea95")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.InMemory/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.ORM.InMemory")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("0a265341-c534-4822-bda8-27f3853b09ab")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.InMemory/ZKWeb.ORM.InMemory.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net461;netstandard2.0 4 | true 5 | ZKWeb.ORM.InMemory 6 | ZKWeb.ORM.InMemory 7 | false 8 | false 9 | false 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | $(DefineConstants);NETCORE 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.MongoDB/IMongoDBEntityMapping.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Reflection; 3 | 4 | namespace ZKWeb.ORM.MongoDB 5 | { 6 | /// 7 | /// Interface for MongoDB entity mapping
8 | /// MongoDB的实体映射接口
9 | ///
10 | public interface IMongoDBEntityMapping 11 | { 12 | /// 13 | /// Collection name
14 | /// 集合名词
15 | ///
16 | string CollectionName { get; } 17 | /// 18 | /// Id member
19 | /// Id成员
20 | ///
21 | MemberInfo IdMember { get; } 22 | /// 23 | /// Ordinary members, not releated to other entities
24 | /// 普通成员, 和其他实体无关的成员
25 | ///
26 | IEnumerable OrdinaryMembers { get; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.MongoDB/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.ORM.MongoDB")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("df94d55b-6572-4487-b9e8-88dd83853b28")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.NHibernate/BetterPostgreSQLConfiguration.cs: -------------------------------------------------------------------------------- 1 | using FluentNHibernate.Cfg.Db; 2 | 3 | namespace ZKWeb.ORM.NHibernate 4 | { 5 | #pragma warning disable S101 // Types should be named in camel case 6 | /// 7 | /// Better postgre sql configuration
8 | /// 更好的PostgreSQL配置类
9 | ///
10 | public class BetterPostgreSQLConfiguration : PostgreSQLConfiguration 11 | { 12 | #pragma warning restore S101 // Types should be named in camel case 13 | /// 14 | /// Better configuration
15 | /// 获取更好的配置
16 | ///
17 | public static PostgreSQLConfiguration Better 18 | { 19 | get { return new BetterPostgreSQLConfiguration().Dialect(); } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.NHibernate/BetterPostgreSQLDialect.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Dialect; 2 | using System.Data; 3 | 4 | namespace ZKWeb.ORM.NHibernate 5 | { 6 | #pragma warning disable S101 // Types should be named in camel case 7 | /// 8 | /// Better pgsql dialect
9 | /// What's improved
10 | /// - Support Guid type
11 | /// 更好的pgsql配置
12 | /// 改进点
13 | /// - 支持Guid类型
14 | ///
15 | public class BetterPostgreSQLDialect : PostgreSQLDialect 16 | { 17 | #pragma warning restore S101 // Types should be named in camel case 18 | /// 19 | /// Initialize
20 | /// 初始化
21 | ///
22 | public BetterPostgreSQLDialect() 23 | { 24 | RegisterColumnType(DbType.Guid, "uuid"); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.NHibernate/NHibernateExtraConfigKeys.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.ORM.NHibernate 2 | { 3 | /// 4 | /// Extra website configuration keys for NHibernate
5 | /// NHibernate使用的网站的附加配置键
6 | ///
7 | public static class NHibernateExtraConfigKeys 8 | { 9 | /// 10 | /// Disable database auto migration for NHibernate
11 | /// 禁用NHibernate的数据库自动迁移
12 | ///
13 | public const string DisableNHibernateDatabaseAutoMigration = "ZKWeb.DisableNHibernateDatabaseAutoMigration"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.NHibernate/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb.ORM.NHibernate")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("edb5064e-77c2-4de0-a1b8-a70196c656d3")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb.ORM.NHibernate/ZKWeb.ORM.NHibernate.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net461;netstandard2.0 4 | true 5 | ZKWeb.ORM.NHibernate 6 | ZKWeb.ORM.NHibernate 7 | false 8 | false 9 | false 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Cache/ICacheCleaner.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Cache 2 | { 3 | /// 4 | /// The interface used to trigger the cache cleanup logic
5 | /// 用于触发缓存清理逻辑的接口
6 | ///
7 | /// 8 | /// You can use the following code to free some memory
9 | /// 你可以使用以下的代码来释放一些内存
10 | /// 11 | /// Application.Ioc.ResolveMany<ICacheCleaner>().ForEach(c => c.ClearCache()); 12 | /// 13 | ///
14 | public interface ICacheCleaner 15 | { 16 | /// 17 | /// Clean cache
18 | /// 清理缓存
19 | ///
20 | void ClearCache(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Cache/ICacheIsolationPolicy.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Cache 2 | { 3 | /// 4 | /// Cache isolation policy
5 | /// 缓存隔离策略
6 | ///
7 | /// 8 | /// If you need to select a policy by name, please provide the key when registering with the IoC container
9 | /// 如果你需要按名称来选择策略,请在注册到IoC容器时提供key
10 | /// 11 | /// public class CacheIsolateByDevice : ICacheIsolationPolicy { 12 | /// public object GetIsolationKey() { 13 | /// return HttpManager.CurrentContext.GetClientDevice(); 14 | /// } 15 | /// } 16 | /// 17 | /// Application.Ioc.RegisterMany<CacheIsolateByDevice>(ReuseType.Singleton, serviceKey: "Device"); 18 | /// 19 | ///
20 | /// 21 | /// 22 | public interface ICacheIsolationPolicy 23 | { 24 | /// 25 | /// Get isolation key
26 | /// 获取隔离键
27 | ///
28 | /// 29 | object GetIsolationKey(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Cache/Policies/CacheIsolateByDevice.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Extensions; 2 | using ZKWebStandard.Web; 3 | 4 | namespace ZKWeb.Cache.Policies 5 | { 6 | /// 7 | /// Isolate cache by client device type, eg Desktop or Mobile
8 | /// 按客户端的设备类型隔离缓存, 例如Desktop或者Mobile
9 | ///
10 | /// 11 | /// 12 | public class CacheIsolateByDevice : ICacheIsolationPolicy 13 | { 14 | /// 15 | /// Get isolation key
16 | /// 获取隔离键
17 | ///
18 | /// 19 | public object GetIsolationKey() 20 | { 21 | return HttpManager.CurrentContext.GetClientDevice(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Cache/Policies/CacheIsolateByLocale.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using ZKWebStandard.Collections; 4 | using ZKWebStandard.Extensions; 5 | using ZKWebStandard.Utils; 6 | using ZKWebStandard.Web; 7 | 8 | namespace ZKWeb.Cache.Policies 9 | { 10 | /// 11 | /// Isolate cache by language and timezone
12 | /// 按语言和时区隔离缓存
13 | ///
14 | /// 15 | /// 16 | public class CacheIsolateByLocale : ICacheIsolationPolicy 17 | { 18 | /// 19 | /// Get isolation key
20 | /// 获取隔离键
21 | ///
22 | /// 23 | public object GetIsolationKey() 24 | { 25 | var language = CultureInfo.CurrentCulture.Name; 26 | var timezone = HttpManager.CurrentContext.GetData(LocaleUtils.TimeZoneKey); 27 | return Pair.Create(language, timezone); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Database/IDatabaseCommandLogger.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Database 2 | { 3 | /// 4 | /// Interface for logging database command such as sql query
5 | /// 用于记录数据库命令(例如sql)的记录器接口 6 | ///
7 | public interface IDatabaseCommandLogger 8 | { 9 | /// 10 | /// Log database command
11 | /// 记录数据库命令
12 | ///
13 | /// Which context execute this command 14 | /// What command executed 15 | /// Different metadata for each ORM 16 | void LogCommand(IDatabaseContext context, string command, object metadata); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Database/IDatabaseContextFactory.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Database 2 | { 3 | /// 4 | /// Interface for database context factory
5 | /// 数据库上下文生成器的接口
6 | ///
7 | /// 8 | /// 9 | public interface IDatabaseContextFactory 10 | { 11 | /// 12 | /// Create database context
13 | /// 创建数据库上下文
14 | ///
15 | /// 16 | IDatabaseContext CreateContext(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Database/IDatabaseInitializeHandler.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Database 2 | { 3 | /// 4 | /// Interface used to customize the processing of the database initialization
5 | /// 用于自定义数据库初始化时的处理的接口
6 | ///
7 | /// 8 | /// 9 | /// [ExportMany] 10 | /// public class DatabaseInitializeHandler : IDatabaseInitializeHandler { 11 | /// public void ConvertTableName(ref string tableName) { 12 | /// tableName = "ZKWeb_" + tableName; 13 | /// } 14 | /// } 15 | /// 16 | /// 17 | /// 18 | /// 19 | public interface IDatabaseInitializeHandler 20 | { 21 | /// 22 | /// Convert table name
23 | /// Attention: Not all ORMs support this feature
24 | /// 转换表名称
25 | /// 注意: 不是所有的ORM都支持这项功能
26 | ///
27 | /// The table name 28 | void ConvertTableName(ref string tableName); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Localize/ILanguage.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Localize 2 | { 3 | /// 4 | /// Interface for language
5 | /// 语言的接口
6 | ///
7 | /// 8 | /// 9 | /// 10 | /// [ExportMany] 11 | /// public class Chinese : ILanguage { 12 | /// public string Name { get { return "zh-CN"; } } 13 | /// } 14 | /// 15 | /// 16 | public interface ILanguage 17 | { 18 | /// 19 | /// ISO language name,eg: zh-CN
20 | /// ISO语言名称, 例如: zh-CN
21 | ///
22 | string Name { get; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Obsoleted/ConfigManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWeb.Server 4 | { 5 | /// 6 | /// Renamed to WebsiteConfigManager
7 | /// 已更名为WebsiteConfigManager
8 | ///
9 | [Obsolete("Renamed to WebsiteConfigManager")] 10 | public class ConfigManager 11 | { 12 | /// 13 | /// Website configuration
14 | /// 网站配置
15 | ///
16 | public virtual WebsiteConfig WebsiteConfig 17 | { 18 | get { return Application.Ioc.Resolve().WebsiteConfig; } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Obsoleted/README.md: -------------------------------------------------------------------------------- 1 | This folder store obsoleted code, they should keep for compatible old plugins 2 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Plugin/CompilerServices/CompilationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWeb.Plugin.CompilerServices 4 | { 5 | #pragma warning disable S3925 // "ISerializable" should be implemented correctly 6 | /// 7 | /// Exception for compilation error
8 | /// 表示编译错误的例外
9 | ///
10 | public class CompilationException : Exception 11 | { 12 | #pragma warning restore S3925 // "ISerializable" should be implemented correctly 13 | /// 14 | /// Initialize
15 | /// 初始化
16 | ///
17 | /// Error message 18 | public CompilationException(string message) : base(message) { } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Plugin/CompilerServices/CompilationOptions.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Plugin.CompilerServices 2 | { 3 | /// 4 | /// Compilation options
5 | /// 编译选项
6 | ///
7 | public class CompilationOptions 8 | { 9 | /// 10 | /// Compile with release mode
11 | /// It may make some break point not work as excepted, Default is false
12 | /// 使用发布模式编译
13 | /// 它可能让某些断点不像预期一样工作, 默认值是false
14 | ///
15 | public bool Release { get; set; } 16 | /// 17 | /// Generate pdb file or not
18 | /// Debuggers require pdb file to debug, Default is true
19 | /// 是否生成pdb文件
20 | /// 调试器调试时需要pdb文件, 默认值是true
21 | ///
22 | public bool GeneratePdbFile { get; set; } 23 | 24 | /// 25 | /// Initialize
26 | /// 初始化
27 | ///
28 | public CompilationOptions() 29 | { 30 | Release = false; 31 | GeneratePdbFile = true; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Plugin/CompilerServices/ICompilerService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ZKWeb.Plugin.CompilerServices 4 | { 5 | /// 6 | /// Interface of compiler service
7 | /// 编译服务的接口
8 | ///
9 | public interface ICompilerService 10 | { 11 | /// 12 | /// Target platform name, net or netstandard
13 | /// 目标平台的名称, net或netstandard
14 | ///
15 | /// 16 | string TargetPlatform { get; } 17 | 18 | /// 19 | /// Compile source files to assembly
20 | /// 编译源代码到程序集
21 | ///
22 | /// Source file paths 23 | /// Assembly name 24 | /// Assembly file path 25 | /// Compilation options 26 | void Compile(IList sourceFiles, 27 | string assemblyName, string assemblyPath, CompilationOptions options = null); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Plugin/IPlugin.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Plugin 2 | { 3 | /// 4 | /// Interface used to perform processing after the plugin loads
5 | /// 用于在插件加载后执行处理的接口
6 | ///
7 | /// 8 | /// 9 | /// [ExportMany] 10 | /// public class Plugin : IPlugin { 11 | /// Plugin() { Console.WriteLine("plugin loaded"); } 12 | /// } 13 | /// 14 | /// 15 | public interface IPlugin { } 16 | } 17 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWeb")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("50d6f28d-4fc8-4711-a0ff-a4ea768cdbd3")] 20 | [assembly: InternalsVisibleTo("Tests.ZKWeb")] -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Serialize/JsonNetInitializer.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using ZKWebStandard.Extensions; 3 | 4 | namespace ZKWeb.Serialize 5 | { 6 | /// 7 | /// Set Json.Net's default settings
8 | /// 修改Json.Net的默认设置
9 | ///
10 | public class JsonNetInitializer 11 | { 12 | /// 13 | /// Set Json.Net's default settings
14 | /// 修改Json.Net的默认设置
15 | ///
16 | internal protected virtual void Initialize() 17 | { 18 | JsonConvert.DefaultSettings = () => 19 | { 20 | var settings = new JsonSerializerSettings(); 21 | // Add custom conveters 22 | var converters = Application.Ioc.ResolveMany(); 23 | converters.ForEach(c => settings.Converters.Add(c)); 24 | // Avoid add items to exist collection, see 25 | // http://stackoverflow.com/questions/24835262/repeated-serialization-and-deserialization-creates-duplicate-items 26 | settings.ObjectCreationHandling = ObjectCreationHandling.Replace; 27 | return settings; 28 | }; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Server/WebsiteConfigManager.cs: -------------------------------------------------------------------------------- 1 | using ZKWeb.Storage; 2 | 3 | namespace ZKWeb.Server 4 | { 5 | /// 6 | /// Website config manager
7 | /// 网站配置管理器
8 | ///
9 | /// 10 | /// 11 | /// var websiteConfigManager = Application.Ioc.Resolve<WebsiteConfigManager>(); 12 | /// var config = websiteConfigManager.WebsiteConfig(); 13 | /// 14 | /// 15 | public class WebsiteConfigManager 16 | { 17 | /// 18 | /// Website configuration
19 | /// 网站配置
20 | ///
21 | public virtual WebsiteConfig WebsiteConfig { get; protected internal set; } 22 | 23 | /// 24 | /// Load website configuration
25 | /// 加载网站配置
26 | ///
27 | internal protected virtual void Initialize() 28 | { 29 | var pathConfig = Application.Ioc.Resolve(); 30 | WebsiteConfig = WebsiteConfig.FromFile(pathConfig.WebsiteConfigPath); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Templating/DynamicContents/ITemplateWidgetRenderer.cs: -------------------------------------------------------------------------------- 1 | using DotLiquid; 2 | 3 | namespace ZKWeb.Templating.DynamicContents 4 | { 5 | /// 6 | /// Template widget renderer
7 | /// 模板模块描画器
8 | ///
9 | /// 10 | public interface ITemplateWidgetRenderer 11 | { 12 | /// 13 | /// Render widget
14 | /// Return render result
15 | /// 描画模板, 返回描画结果
16 | ///
17 | /// Template context 18 | /// Template widget 19 | string Render(Context context, TemplateWidget widget); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Templating/DynamicContents/TemplateArea.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ZKWeb.Templating.DynamicContents 4 | { 5 | /// 6 | /// Template area
7 | /// 模板区域
8 | ///
9 | /// 10 | /// 11 | /// 12 | public class TemplateArea 13 | { 14 | /// 15 | /// Area Id
16 | /// 区域Id
17 | ///
18 | public string Id { get; set; } 19 | /// 20 | /// Default widgets
21 | /// 该区域下的默认模块列表
22 | ///
23 | public IList DefaultWidgets { get; set; } 24 | 25 | /// 26 | /// Initialize
27 | /// 初始化
28 | ///
29 | /// Area id 30 | public TemplateArea(string id) 31 | { 32 | Id = id; 33 | DefaultWidgets = new List(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Templating/DynamicContents/TemplateWidgetExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Templating.DynamicContents 2 | { 3 | /// 4 | /// Template widget extension methods
5 | /// 模板模块的扩展函数
6 | ///
7 | /// 8 | public static class TemplateWidgetExtensions 9 | { 10 | /// 11 | /// Get cache key for template widget
12 | /// 获取模板模块的缓存键
13 | ///
14 | /// Template widget 15 | /// 16 | public static string GetCacheKey(this TemplateWidget widget) 17 | { 18 | var cacheKey = widget.Path; 19 | var argsJson = widget.ArgsJson; 20 | if (argsJson != null) 21 | { 22 | cacheKey += argsJson; 23 | } 24 | return cacheKey; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Templating/DynamicContents/TemplateWidgetInfoExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ZKWeb.Templating.DynamicContents 4 | { 5 | /// 6 | /// Template widget information extension methods
7 | /// 模板模块的信息的扩展函数
8 | ///
9 | /// 10 | public static class TemplateWidgetInfoExtensions 11 | { 12 | /// 13 | /// Get cache isolation policy names
14 | /// With "Device" anyway even it's not in the configuration
15 | /// 获取缓存隔离策略的名称列表
16 | /// 会添加"Device"无论它是否在配置中
17 | ///
18 | /// Widget information 19 | /// 20 | public static IList GetCacheIsolationPolicyNames(this TemplateWidgetInfo info) 21 | { 22 | var result = new List(); 23 | if (!string.IsNullOrEmpty(info.CacheBy)) 24 | { 25 | result.AddRange(info.CacheBy.Split(',')); 26 | } 27 | result.Add("Device"); 28 | return result; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Templating/TemplateTags/HtmlLang.cs: -------------------------------------------------------------------------------- 1 | using DotLiquid; 2 | using System.Globalization; 3 | using System.IO; 4 | 5 | namespace ZKWeb.Templating.TemplateTags 6 | { 7 | /// 8 | /// Display the language code
9 | /// 显示当前语言代码
10 | ///
11 | ///
12 | /// 13 | /// 14 | /// 15 | /// <html lang="{% html_lang %}"></html> 16 | /// 17 | /// 18 | public class HtmlLang : Tag 19 | { 20 | /// 21 | /// Render contents
22 | /// 描画内容
23 | ///
24 | public override void Render(Context context, TextWriter result) 25 | { 26 | result.Write(CultureInfo.CurrentCulture.Name); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Templating/TemplateTags/RawHtml.cs: -------------------------------------------------------------------------------- 1 | using DotLiquid; 2 | using System.IO; 3 | 4 | namespace ZKWeb.Templating.TemplateTags 5 | { 6 | /// 7 | /// Render text as raw html
8 | /// 把文本作为Html描画
9 | ///
10 | /// 11 | /// 12 | /// 13 | /// {% raw_html variable %} 14 | /// 15 | /// 16 | public class RawHtml : Tag 17 | { 18 | /// 19 | /// Render contents
20 | /// 描画内容
21 | ///
22 | public override void Render(Context context, TextWriter result) 23 | { 24 | result.Write(context[Markup.Trim()]); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Version.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $([System.IO.File]::ReadAllText("..\..\VERSION.txt").Trim()) 5 | $(ExternalVersionStr.Split('-')[0]) 6 | 7 | 8 | 9 | 10 | $(ExternalVersionStr) 11 | $(ExternalVersionStr) 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Web/HttpMethods.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Web 2 | { 3 | /// 4 | /// Common http methods
5 | /// 常用的Http方法
6 | ///
7 | public static class HttpMethods 8 | { 9 | /// 10 | /// GET 11 | /// 12 | public const string GET = "GET"; 13 | /// 14 | /// POST 15 | /// 16 | public const string POST = "POST"; 17 | /// 18 | /// PUT 19 | /// 20 | public const string PUT = "PUT"; 21 | /// 22 | /// DELETE 23 | /// 24 | public const string DELETE = "DELETE"; 25 | /// 26 | /// PATCH 27 | /// 28 | public const string PATCH = "PATCH"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Web/HttpRequestHandlers/AddVersionHeaderHandler.cs: -------------------------------------------------------------------------------- 1 | using ZKWebStandard.Web; 2 | 3 | namespace ZKWeb.Web.HttpRequestHandlers 4 | { 5 | /// 6 | /// Add zkweb version header to http response
7 | /// 添加ZKWeb版本标识到Http回应
8 | ///
9 | /// 10 | public class AddVersionHeaderHandler : IHttpRequestPreHandler 11 | { 12 | /// 13 | /// Handle request
14 | /// 处理请求
15 | ///
16 | public void OnRequest() 17 | { 18 | var response = HttpManager.CurrentContext.Response; 19 | response.AddHeader("X-ZKWeb-Version", Application.FullVersion); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Web/IActionFilter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWeb.Web 4 | { 5 | /// 6 | /// Action filter
7 | /// Action过滤器
8 | ///
9 | /// 10 | /// 11 | public interface IActionFilter 12 | { 13 | /// 14 | /// Return wrapped action 15 | /// 返回包装的Action函数
16 | ///
17 | /// Original action 18 | /// 19 | Func Filter(Func action); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Web/IController.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Web 2 | { 3 | /// 4 | /// Interface of the controller
5 | /// 控制器的接口
6 | ///
7 | /// 8 | /// 9 | /// [ExportMany] 10 | /// class TestController : IController { 11 | /// [Action("index.html")] 12 | /// public string Index() { return "test index"; } 13 | /// } 14 | /// 15 | /// 16 | /// 17 | public interface IController 18 | { 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Web/IWebsiteStartHandler.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Web 2 | { 3 | /// 4 | /// Interface of website start handler
5 | /// Execute after all IPlugin executed
6 | /// 网站启动处理器的接口
7 | /// 在所有IPlugin执行后执行
8 | ///
9 | /// 10 | /// 11 | /// 12 | /// [ExportMany] 13 | /// public ExampleWebsiteStartHandler : IWebsiteStartHandler { 14 | /// public void OnWebsiteStart() { 15 | /// var logManager = Application.Ioc.Resolve<LogManager>(); 16 | /// logManager.LogDebug("website started"); 17 | /// } 18 | /// } 19 | /// 20 | /// 21 | public interface IWebsiteStartHandler 22 | { 23 | /// 24 | /// Handle website start
25 | /// 处理网站启动
26 | ///
27 | void OnWebsiteStart(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Web/IWebsiteStopper.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWeb.Web 2 | { 3 | /// 4 | /// Interface for stop website running
5 | /// Usually provide by hosting environment
6 | /// 用于停止网站运行的接口
7 | /// 通常由托管环境提供
8 | ///
9 | /// 10 | /// 11 | /// 12 | /// 13 | /// internal class AspNetWebsiteStopper : IWebsiteStopper { 14 | /// public void StopWebsite() { 15 | /// HttpRuntime.UnloadAppDomain(); 16 | /// } 17 | /// } 18 | /// 19 | /// 20 | public interface IWebsiteStopper 21 | { 22 | /// 23 | /// Stop website running
24 | /// 停止网站运行
25 | ///
26 | void StopWebsite(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ZKWeb/ZKWeb/Web/ThreadPoolInitializer.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | 3 | namespace ZKWeb.Web 4 | { 5 | /// 6 | /// Thread pool initializer
7 | /// 初始化线程池
8 | ///
9 | /// 10 | public class ThreadPoolInitializer 11 | { 12 | /// 13 | /// Initialize thread pool
14 | /// 初始化线程池
15 | ///
16 | internal protected virtual void Initialize() 17 | { 18 | #if NETCORE 19 | // SetMaxThreads is unsupported in .Net Core 20 | // But you can use configuration file, see 21 | // https://github.com/dotnet/cli/issues/889#issuecomment-172975280 22 | // https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/specs/runtime-configuration-file.md 23 | #else 24 | // Set max threads as much as possible 25 | // It's (32767, 32767) on my environment actually 26 | ThreadPool.SetMaxThreads(int.MaxValue, int.MaxValue); 27 | #endif 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Extensions/ByteArrayExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Extensions 4 | { 5 | /// 6 | /// Byte array extension methods
7 | /// 字节数组的扩展函数
8 | ///
9 | public static class ByteArrayExtensions 10 | { 11 | /// 12 | /// Convert byte array to hex former, in lower case
13 | /// 转换字节数组到Hex格式, 且英文字母是小写
14 | ///
15 | /// Byte array 16 | /// 17 | /// 18 | /// 19 | /// var bytes = new byte[] { 1, 0x12, 0x13 }; 20 | /// var hex = bytes.ToHex(); // "011213" 21 | /// 22 | /// 23 | public static string ToHex(this byte[] data) 24 | { 25 | if (data == null) 26 | { 27 | return ""; 28 | } 29 | return BitConverter.ToString(data).Replace("-", "").ToLowerInvariant(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Extensions/DecimalExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWebStandard.Extensions 2 | { 3 | /// 4 | /// Decimal extension methods
5 | /// Decimal的扩展函数
6 | ///
7 | public static class DecimalExtensions 8 | { 9 | /// 10 | /// Remove excess 0s after decimal
11 | /// 删除小数点后多余的0
12 | /// Eg: giving 12.3000 will return 12.3 13 | /// See: http://stackoverflow.com/questions/4298719/parse-decimal-and-filter-extra-0-on-the-right 14 | ///
15 | /// 16 | /// 17 | /// (12.3000M).Normalize().ToString() == "12.3" 18 | /// (0.0001M).Normalize().ToString() == "0.0001" 19 | /// (0.000001000M).Normalize().ToString() == "0.000001" 20 | /// 21 | /// 22 | public static decimal Normalize(this decimal value) 23 | { 24 | return value / 1.000000000000000000000000000000000m; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Extensions/MethodInfoExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Text; 3 | 4 | namespace ZKWebStandard.Extensions 5 | { 6 | /// 7 | /// MethodInfo extensions
8 | /// 函数信息的扩展函数
9 | ///
10 | public static class MethodInfoExtensions 11 | { 12 | /// 13 | /// Get full name of method
14 | /// Including type name and method name
15 | /// 获取函数的全名
16 | /// 包括类型的全名和函数名称
17 | ///
18 | /// Method information 19 | /// 20 | /// 21 | /// var methodInfo = this.GetType().FastGetMethod("GetFullName"); 22 | /// var fullname = methodInfo.GetFullName(); 23 | /// 24 | /// 25 | public static string GetFullName(this MethodInfo info) 26 | { 27 | var result = new StringBuilder(); 28 | result.Append(info.DeclaringType.FullName).Append('.').Append(info.Name); 29 | return result.ToString(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/ContainerFactoryDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Ioc 4 | { 5 | /// 6 | /// The delegate type of factory function
7 | /// 工厂函数的委托类型
8 | ///
9 | public delegate object ContainerFactoryDelegate(IContainer container, Type serviceType); 10 | } 11 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/ExportAttributeBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Ioc 4 | { 5 | #pragma warning disable S3376 // Attribute, EventArgs, and Exception type names should end with the type being extended 6 | /// 7 | /// Base attribute for register type to IoC container
8 | /// 注册类型到IoC容器使用的属性的基类
9 | ///
10 | public abstract class ExportAttributeBase : Attribute 11 | { 12 | #pragma warning restore S3376 // Attribute, EventArgs, and Exception type names should end with the type being extended 13 | /// 14 | /// Register implementation type to container
15 | /// 注册实现类型到容器
16 | ///
17 | /// Container 18 | /// Implementation type 19 | /// Reuse type 20 | public abstract void RegisterToContainer(IContainer container, Type type, ReuseType reuseType); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/Extensions/IMultiConstructorResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Ioc.Extensions 4 | { 5 | /// 6 | /// Interface used to resolve type have multi constructors
7 | /// 用于解决拥有多个构造函数的类型的接口
8 | ///
9 | public interface IMultiConstructorResolver 10 | { 11 | /// 12 | /// Resolve type have multi constructors
13 | /// 解决拥有多个构造函数的类型
14 | ///
15 | object Resolve(Type type); 16 | 17 | /// 18 | /// Clear factory cache, please run it after alter container
19 | /// 清空工厂函数的缓存, 请在修改容器后运行它
20 | ///
21 | void ClearCache(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/IScopeDisposer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Ioc 4 | { 5 | /// 6 | /// Interface for dispose objects when scope finished
7 | /// 用于在范围结束后调用指定对象的Dispose函数的接口
8 | ///
9 | public interface IScopeDisposer 10 | { 11 | /// 12 | /// Dispose specific object when scope finished
13 | /// 在范围结束后调用指定对象的Dispose函数
14 | ///
15 | void DisposeWhenScopeFinished(IDisposable disposable); 16 | 17 | /// 18 | /// Notify scope finished
19 | /// 通知当前范围已结束
20 | ///
21 | void ScopeFinished(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/IfUnresolved.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWebStandard.Ioc 2 | { 3 | /// 4 | /// Action when service unresolved
5 | /// 服务解决失败时的操作
6 | ///
7 | /// 8 | /// 9 | public enum IfUnresolved 10 | { 11 | /// 12 | /// Throw exception
13 | /// It's the default behaviour
14 | /// 抛出例外
15 | /// 它是默认的操作
16 | ///
17 | Throw = 0, 18 | /// 19 | /// Return default value
20 | /// 返回默认值
21 | ///
22 | ReturnDefault = 1 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/InjectAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Ioc 4 | { 5 | /// 6 | /// Choose which constructor to inject explicitly
7 | /// 选择注入哪个构造函数时使用的属性
8 | ///
9 | /// 10 | /// 11 | [AttributeUsage(AttributeTargets.Constructor)] 12 | public class InjectAttribute : Attribute 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/ReuseAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Ioc 4 | { 5 | /// 6 | /// Reuse type attribute
7 | /// It should use with ExportManyAttributes
8 | /// 标记重用类型的属性
9 | /// 应该与ExportManyAttribute一起使用
10 | ///
11 | /// 12 | /// 13 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)] 14 | public class ReuseAttribute : Attribute 15 | { 16 | /// 17 | /// Reuse type
18 | /// 重用类型
19 | ///
20 | public ReuseType ReuseType { get; set; } 21 | 22 | /// 23 | /// Initialize
24 | /// 初始化
25 | ///
26 | /// Reuse type 27 | public ReuseAttribute(ReuseType reuseType) 28 | { 29 | ReuseType = reuseType; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/ReuseType.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWebStandard.Ioc 2 | { 3 | /// 4 | /// Service reuse type
5 | /// 重用类型
6 | ///
7 | /// 8 | /// 9 | public enum ReuseType 10 | { 11 | /// 12 | /// Transient, no reuse
13 | /// 临时,不重用
14 | ///
15 | Transient = 0, 16 | /// 17 | /// Singleton, reuse in the future, it's granted to be thread safe
18 | /// 单例,会在将来重用,并保证线程安全
19 | ///
20 | Singleton = 1, 21 | /// 22 | /// Scoped, reuse in the same scope, it's granted to be thread safe
23 | /// 区域, 会在同一个区域中重用, 并保证线程安全
24 | ///
25 | Scoped = 2 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/ScopedReuseAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Ioc 4 | { 5 | /// 6 | /// Scoped reuse attribute
7 | /// A convenient attribute from ReuseAttribute
8 | /// 标记范围重用的属性
9 | /// 继承了ReuseAttribute的便捷属性
10 | ///
11 | /// 12 | /// 13 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)] 14 | public class ScopedReuseAttribute : ReuseAttribute 15 | { 16 | /// 17 | /// Initialize
18 | /// 初始化
19 | ///
20 | public ScopedReuseAttribute() : base(ReuseType.Scoped) { } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Ioc/SingletonReuseAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Ioc 4 | { 5 | /// 6 | /// Singleton reuse attribute
7 | /// A convenient attribute from ReuseAttribute
8 | /// 标记单例的属性
9 | /// 继承了ReuseAttribute的便捷属性
10 | ///
11 | /// 12 | /// 13 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)] 14 | public class SingletonReuseAttribute : ReuseAttribute 15 | { 16 | /// 17 | /// Initialize
18 | /// 初始化
19 | ///
20 | public SingletonReuseAttribute() : base(ReuseType.Singleton) { } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("ZKWebStandard")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("440bd038-b3d4-46f0-8fc7-b789a2d3c456")] 20 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/AssertException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Testing 4 | { 5 | #pragma warning disable S3925 // "ISerializable" should be implemented correctly 6 | /// 7 | /// Assert failed exception
8 | /// 断言失败的例外
9 | ///
10 | /// 11 | public class AssertException : Exception 12 | { 13 | #pragma warning restore S3925 // "ISerializable" should be implemented correctly 14 | /// 15 | /// Initialize
16 | /// 初始化
17 | ///
18 | /// The reason 19 | public AssertException(string reason) : base(reason) { } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/AssertPassedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Testing 4 | { 5 | #pragma warning disable S3925 // "ISerializable" should be implemented correctly 6 | /// 7 | /// Assert passed exception
8 | /// Will make the test passed
9 | /// 断言通过的例外
10 | /// 会让测试通过
11 | ///
12 | /// 13 | public class AssertPassedException : Exception 14 | { 15 | #pragma warning restore S3925 // "ISerializable" should be implemented correctly 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/AssertSkipedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Testing 4 | { 5 | #pragma warning disable S3925 // "ISerializable" should be implemented correctly 6 | /// 7 | /// Assert skipped exception
8 | /// Will make the test skipped
9 | /// 断言跳过的例外
10 | /// 会跳过测试
11 | ///
12 | /// 13 | public class AssertSkipedException : Exception 14 | { 15 | #pragma warning restore S3925 // "ISerializable" should be implemented correctly 16 | /// 17 | /// Initialize
18 | /// 初始化
19 | ///
20 | /// The reason 21 | public AssertSkipedException(string reason) : base(reason) { } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/Events/AllTestCompletedInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWebStandard.Testing.Events 2 | { 3 | /// 4 | /// Information for all test completed
5 | /// 所有测试完成后的信息
6 | ///
7 | public class AllTestCompletedInfo 8 | { 9 | /// 10 | /// Test runner
11 | /// 测试运行器
12 | ///
13 | public TestRunner Runner { get; private set; } 14 | /// 15 | /// Test result counter
16 | /// 测试结果计数器
17 | ///
18 | public TestResultCounter Counter { get; private set; } 19 | 20 | /// 21 | /// Initialize
22 | /// 初始化
23 | ///
24 | /// Test runner 25 | /// Test result counter 26 | public AllTestCompletedInfo(TestRunner runner, TestResultCounter counter) 27 | { 28 | Runner = runner; 29 | Counter = counter; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/Events/AllTestStartingInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWebStandard.Testing.Events 2 | { 3 | /// 4 | /// Information for all test starting
5 | /// 所有测试开始后的信息
6 | ///
7 | public class AllTestStartingInfo 8 | { 9 | /// 10 | /// Test runner
11 | /// 测试运行器
12 | ///
13 | public TestRunner Runner { get; private set; } 14 | 15 | /// 16 | /// Initialize
17 | /// 初始化
18 | ///
19 | /// Test runner 20 | public AllTestStartingInfo(TestRunner runner) 21 | { 22 | Runner = runner; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/Events/DebugMessageInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWebStandard.Testing.Events 2 | { 3 | /// 4 | /// Information for debug message
5 | /// 除错消息的信息
6 | ///
7 | public class DebugMessageInfo 8 | { 9 | /// 10 | /// Test runner
11 | /// 测试运行器
12 | ///
13 | public TestRunner Runner { get; private set; } 14 | /// 15 | /// Debug message
16 | /// 除错消息
17 | ///
18 | public string Message { get; private set; } 19 | 20 | /// 21 | /// Initialize
22 | /// 初始化
23 | ///
24 | /// Test runner 25 | /// Debug message 26 | public DebugMessageInfo(TestRunner runner, string message) 27 | { 28 | Runner = runner; 29 | Message = message; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/Events/ErrorMessageInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWebStandard.Testing.Events 2 | { 3 | /// 4 | /// Information for error message
5 | /// 错误消息的信息
6 | ///
7 | public class ErrorMessageInfo 8 | { 9 | /// 10 | /// Test runner
11 | /// 测试运行器
12 | ///
13 | public TestRunner Runner { get; private set; } 14 | /// 15 | /// Error message
16 | /// 错误消息
17 | ///
18 | public string Message { get; private set; } 19 | 20 | /// 21 | /// Initialize
22 | /// 初始化
23 | ///
24 | /// Test runner 25 | /// Error message 26 | public ErrorMessageInfo(TestRunner runner, string message) 27 | { 28 | Runner = runner; 29 | Message = message; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/ScenarioException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Testing 4 | { 5 | /// 6 | /// Scenario exception used for for BDD
7 | /// 用于BDD的场景异常类
8 | ///
9 | public class ScenarioException : Exception 10 | { 11 | /// 12 | /// Initialize
13 | /// 初始化
14 | ///
15 | /// The reason 16 | public ScenarioException(string reason) : base(reason) { } 17 | } 18 | } -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/TestResultCounter.cs: -------------------------------------------------------------------------------- 1 | namespace ZKWebStandard.Testing 2 | { 3 | /// 4 | /// Test result counter
5 | /// 测试结果计数器
6 | ///
7 | /// 8 | public class TestResultCounter 9 | { 10 | /// 11 | /// The number of tests passed
12 | /// 通过的测试数量
13 | ///
14 | public ulong Passed { get; set; } 15 | /// 16 | /// The number of tests failed
17 | /// 失败的测试数量
18 | ///
19 | public ulong Failed { get; set; } 20 | /// 21 | /// The number of tests skipped
22 | /// 跳过的测试数量
23 | ///
24 | public ulong Skipped { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Testing/TestsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZKWebStandard.Testing 4 | { 5 | /// 6 | /// Attribute for mark class contains test methods
7 | /// 标记类包含测试函数的属性
8 | ///
9 | /// 10 | /// 11 | /// 12 | /// 13 | /// [Tests] 14 | /// class ExampleTest { 15 | /// public void MethodA() { 16 | /// Assert.IsTrue(1 == 1); 17 | /// Assert.IsTrueWith(1 == 1, "if failed this item will be outputed"); 18 | /// Assert.Equals(true, true); 19 | /// Assert.Throws<ArgumentException>(() => { throw new ArgumentException(); }); 20 | /// } 21 | /// } 22 | /// 23 | /// 24 | [AttributeUsage(AttributeTargets.Class)] 25 | public class TestsAttribute : Attribute 26 | { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Utils/SystemUtils.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace ZKWebStandard.Utils 4 | { 5 | /// 6 | /// System utility functions
7 | /// 系统的工具函数
8 | ///
9 | public static class SystemUtils 10 | { 11 | /// 12 | /// Get used memory in bytes
13 | /// 获取占用的内存大小
14 | ///
15 | /// 16 | /// 17 | /// 18 | /// var value = SystemUtils.GetUsedMemoryBytes(); 19 | /// 20 | /// 21 | public static long GetUsedMemoryBytes() 22 | { 23 | using (var process = Process.GetCurrentProcess()) 24 | { 25 | return process.WorkingSet64; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Web/IHttpContext.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ZKWebStandard.Web 4 | { 5 | /// 6 | /// Interface for http context
7 | /// Http上下文的接口
8 | ///
9 | public interface IHttpContext 10 | { 11 | /// 12 | /// Http request
13 | /// Http请求
14 | ///
15 | IHttpRequest Request { get; } 16 | /// 17 | /// Http response
18 | /// Http回应
19 | ///
20 | IHttpResponse Response { get; } 21 | /// 22 | /// Http context bound items
23 | /// 绑定到上下文的对象集合
24 | ///
25 | IDictionary Items { get; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Web/IHttpPostedFile.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace ZKWebStandard.Web 4 | { 5 | /// 6 | /// Interface for posted file
7 | /// Http提交文件的接口
8 | ///
9 | public interface IHttpPostedFile 10 | { 11 | /// 12 | /// Content type
13 | /// 内容类型
14 | ///
15 | string ContentType { get; } 16 | /// 17 | /// File name
18 | /// 文件名
19 | ///
20 | string FileName { get; } 21 | /// 22 | /// File length
23 | /// 文件长度
24 | ///
25 | long Length { get; } 26 | /// 27 | /// Open stream for reading file
28 | /// 打开读取文件的数据流
29 | ///
30 | /// 31 | Stream OpenReadStream(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Web/Mock/HttpPostFileMock.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace ZKWebStandard.Web.Mock 4 | { 5 | /// 6 | /// Http posted file mock
7 | /// Http提交文件的模拟类
8 | ///
9 | public class HttpPostFileMock : IHttpPostedFile 10 | { 11 | #pragma warning disable CS1591 12 | public string contentType { get; set; } 13 | public string filename { get; set; } 14 | public long length { get; set; } 15 | public Stream stream { get; set; } 16 | 17 | public string ContentType { get { return contentType; } } 18 | public string FileName { get { return filename; } } 19 | public long Length { get { return length; } } 20 | public Stream OpenReadStream() 21 | { 22 | return stream; 23 | } 24 | #pragma warning restore CS1591 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ZKWeb/ZKWebStandard/Web/Wrappers/HttpContextWrapper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ZKWebStandard.Web.Wrappers 4 | { 5 | /// 6 | /// Http context wrapper base class
7 | /// Http上下文包装类的基类
8 | ///
9 | public abstract class HttpContextWrapper : IHttpContext 10 | { 11 | #pragma warning disable CS1591 12 | protected virtual IHttpContext OriginalContext { get; set; } 13 | 14 | public virtual IHttpRequest Request 15 | { 16 | get { return OriginalContext.Request; } 17 | } 18 | public virtual IHttpResponse Response 19 | { 20 | get { return OriginalContext.Response; } 21 | } 22 | public virtual IDictionary Items 23 | { 24 | get { return OriginalContext.Items; } 25 | } 26 | 27 | protected HttpContextWrapper(IHttpContext originalContext) 28 | { 29 | OriginalContext = originalContext; 30 | } 31 | #pragma warning restore CS1591 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ZKWeb/nuget/ZKWeb.Hosting.AspNet.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ZKWeb.Hosting.AspNet 5 | $version$ 6 | ZKWeb.Hosting.AspNet 7 | 303248153 8 | 303248153 9 | Support hosting ZKWeb on Asp.Net. For more information please visit project site. 10 | Support hosting ZKWeb on Asp.Net. For more information please visit project site. 11 | en-US 12 | https://github.com/zkweb-framework/ZKWeb 13 | MIT 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ZKWeb/nuget/pack.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cd .. 3 | dotnet restore 4 | dotnet build -c Release 5 | cd nuget 6 | del *.nupkg 7 | set /p VERSION=<..\..\VERSION.txt 8 | echo %VERSION% 9 | for %%f in (*.nuspec) do nuget pack -Properties "version=%VERSION%" "%%f" 10 | -------------------------------------------------------------------------------- /ZKWeb/nuget/pack.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cd .. 3 | dotnet restore 4 | dotnet build -c Release 5 | cd nuget 6 | Version=$(cat ../../VERSION.txt) 7 | rm -fv *.nupkg 8 | for filename in $(ls *.nuspec); do 9 | nuget pack -Properties "version=${Version}" "$filename" 10 | done 11 | sleep 5 -------------------------------------------------------------------------------- /ZKWeb/nuget/push.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | for %%f in (*.nupkg) do nuget push -Source nuget.org "%%f" 3 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | image: Visual Studio 2019 3 | before_build: 4 | - cmd: >- 5 | echo -%APPVEYOR_BUILD_NUMBER% >> VERSION.txt 6 | 7 | cd ZKWeb 8 | 9 | dotnet restore 10 | build: 11 | project: ZKWeb/ZKWeb.sln 12 | verbosity: minimal 13 | configuration: 14 | - Release 15 | after_build: 16 | - cmd: >- 17 | dir 18 | 19 | cd ZKWeb.Console 20 | 21 | dotnet run -f net461 22 | 23 | dotnet run -f netcoreapp3.0 24 | 25 | cd ..\nuget 26 | 27 | pack.bat 28 | artifacts: 29 | - path: ZKWeb/nuget/*.nupkg 30 | deploy: 31 | provider: NuGet 32 | server: https://www.myget.org/F/zkweb/api/v2/package 33 | api_key: 34 | secure: 08Ei1ipRHb6QMmYdkzwneGgXQMl5CtYYrJ0sQR/hFWPhC92OEwQooo114gc7SB2D 35 | skip_symbols: false 36 | -------------------------------------------------------------------------------- /fix_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # remove tailing line break in VERSION.txt 3 | import os 4 | ver = open("VERSION.txt", "rb").read().replace(b"\r", b"").replace(b"\n", b"") 5 | open("VERSION.txt", "wb").write(ver) 6 | os.system("hexdump -C VERSION.txt") 7 | --------------------------------------------------------------------------------