From e74ff061b45f966ada92d4e95712c660f8e0a80c Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Thu, 18 Apr 2019 17:50:23 +0300 Subject: [PATCH 001/335] Added solution builder code and created command parser --- framework/Volo.Abp.sln | 28 ++-- framework/src/Volo.Abp.Cli/Program.cs | 12 -- .../src/Volo.Abp.Cli/Volo.Abp.Cli.csproj | 12 ++ .../Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs | 13 ++ .../Volo/Abp/Cli/Args/CommandLineArgs.cs | 62 +++++++++ .../Abp/Cli/Args/CommandLineArgumentParser.cs | 104 +++++++++++++++ .../Volo/Abp/Cli/Args/CommandLineOptions.cs | 9 ++ .../Cli/Args/ICommandLineArgumentParser.cs | 7 + .../Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs | 29 ++++ .../Volo/Abp/Cli/Commands/CommandSelector.cs | 20 +++ .../Volo/Abp/Cli/Commands/ICommandSelector.cs | 7 + .../Volo/Abp/Cli/Commands/IConsoleCommand.cs | 9 ++ .../Volo/Abp/Cli/Commands/MainHelpCommand.cs | 23 ++++ .../Abp/Cli/Commands/NewProjectCommand.cs | 21 +++ .../src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs | 24 ++++ .../Building/DatabaseProvider.cs | 9 ++ .../Building/GithubRepositoryInfo.cs | 25 ++++ .../Building/ProjectBuildContext.cs | 29 ++++ .../Building/ProjectBuildContextExtensions.cs | 20 +++ .../Building/ProjectBuildPipeline.cs | 22 +++ .../Building/ProjectBuildPipelineBuilder.cs | 22 +++ .../Building/ProjectBuildPipelineStep.cs | 7 + .../Building/ProjectBuildRequest.cs | 23 ++++ .../Building/ProjectResult.cs | 7 + .../Steps/CreateProjectResultZipStep.cs | 23 ++++ .../Building/Steps/FileEntryListReadStep.cs | 58 ++++++++ .../Building/Steps/GithubDownloadStep.cs | 33 +++++ .../Steps/NugetReferenceReplaceStep.cs | 113 ++++++++++++++++ .../Steps/RemoveProjectFromSolutionStep.cs | 71 ++++++++++ .../Building/Steps/SolutionRenameStep.cs | 116 ++++++++++++++++ .../SwitchEntityFrameworkCoreToMongoDbStep.cs | 80 +++++++++++ .../Building/Steps/TemplateCodeDeleteStep.cs | 19 +++ .../Building/TemplateInfo.cs | 33 +++++ .../Abp/SolutionTemplating/DownloadInfo.cs | 37 +++++ .../Abp/SolutionTemplating/Files/FileEntry.cs | 126 ++++++++++++++++++ .../Files/FileEntryExtensions.cs | 81 +++++++++++ .../SolutionTemplating/Files/FileEntryList.cs | 13 ++ .../Files/FileEntryListExtensions.cs | 24 ++++ .../Github/GithubManager.cs | 94 +++++++++++++ .../Github/GithubRelease.cs | 21 +++ .../SolutionTemplating/SolutionBuildResult.cs | 15 +++ .../Abp/SolutionTemplating/SolutionBuilder.cs | 64 +++++++++ .../Abp/SolutionTemplating/SolutionName.cs | 50 +++++++ .../SolutionTemplating/StandardVersions.cs | 9 ++ .../Zipping/ZipFileExtensions.cs | 57 ++++++++ .../Volo/Abp/AbpApplicationBase.cs | 2 +- .../Volo.Abp.Cli.Tests.csproj | 15 +++ .../Volo/Abp/Cli/AbpCliTestBase.cs | 7 + .../Volo/Abp/Cli/AbpCliTestModule.cs | 13 ++ .../Cli/CommandLineArgumentParser_Tests.cs | 68 ++++++++++ 50 files changed, 1762 insertions(+), 24 deletions(-) delete mode 100644 framework/src/Volo.Abp.Cli/Program.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgumentParser.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineOptions.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/ICommandLineArgumentParser.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/RemoveProjectFromSolutionStep.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/DownloadInfo.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntry.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubManager.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuilder.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionName.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/StandardVersions.cs create mode 100644 framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs create mode 100644 framework/test/Volo.Abp.Cli.Tests/Volo.Abp.Cli.Tests.csproj create mode 100644 framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/AbpCliTestBase.cs create mode 100644 framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/AbpCliTestModule.cs create mode 100644 framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/CommandLineArgumentParser_Tests.cs diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index 10be5a757d..d63ef20752 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -1,7 +1,6 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28803.156 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.168 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}" EndProject @@ -219,11 +218,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp", "src\Volo.Abp\Vo EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Authentication.JwtBearer", "src\Volo.Abp.AspNetCore.Authentication.JwtBearer\Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj", "{46C6336C-A1D8-4858-98CE-6F4C698C5A77}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Cli", "src\Volo.Abp.Cli\Volo.Abp.Cli.csproj", "{69168816-4394-4DDA-BB6B-C21983D37F0B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Cli", "src\Volo.Abp.Cli\Volo.Abp.Cli.csproj", "{69168816-4394-4DDA-BB6B-C21983D37F0B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.FluentValidation", "src\Volo.Abp.FluentValidation\Volo.Abp.FluentValidation.csproj", "{43D5FE61-ECBF-4B16-AD95-0043E18EB93A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FluentValidation", "src\Volo.Abp.FluentValidation\Volo.Abp.FluentValidation.csproj", "{43D5FE61-ECBF-4B16-AD95-0043E18EB93A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.FluentValidation.Tests", "test\Volo.Abp.FluentValidation.Tests\Volo.Abp.FluentValidation.Tests.csproj", "{E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FluentValidation.Tests", "test\Volo.Abp.FluentValidation.Tests\Volo.Abp.FluentValidation.Tests.csproj", "{E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Cli.Tests", "test\Volo.Abp.Cli.Tests\Volo.Abp.Cli.Tests.csproj", "{92B70EFF-C1B1-4D1D-8BCE-D116908FC6FF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -655,6 +656,10 @@ Global {46C6336C-A1D8-4858-98CE-6F4C698C5A77}.Debug|Any CPU.Build.0 = Debug|Any CPU {46C6336C-A1D8-4858-98CE-6F4C698C5A77}.Release|Any CPU.ActiveCfg = Release|Any CPU {46C6336C-A1D8-4858-98CE-6F4C698C5A77}.Release|Any CPU.Build.0 = Release|Any CPU + {69168816-4394-4DDA-BB6B-C21983D37F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69168816-4394-4DDA-BB6B-C21983D37F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69168816-4394-4DDA-BB6B-C21983D37F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69168816-4394-4DDA-BB6B-C21983D37F0B}.Release|Any CPU.Build.0 = Release|Any CPU {43D5FE61-ECBF-4B16-AD95-0043E18EB93A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {43D5FE61-ECBF-4B16-AD95-0043E18EB93A}.Debug|Any CPU.Build.0 = Debug|Any CPU {43D5FE61-ECBF-4B16-AD95-0043E18EB93A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -663,10 +668,10 @@ Global {E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}.Debug|Any CPU.Build.0 = Debug|Any CPU {E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}.Release|Any CPU.ActiveCfg = Release|Any CPU {E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}.Release|Any CPU.Build.0 = Release|Any CPU - {69168816-4394-4DDA-BB6B-C21983D37F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69168816-4394-4DDA-BB6B-C21983D37F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69168816-4394-4DDA-BB6B-C21983D37F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69168816-4394-4DDA-BB6B-C21983D37F0B}.Release|Any CPU.Build.0 = Release|Any CPU + {92B70EFF-C1B1-4D1D-8BCE-D116908FC6FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92B70EFF-C1B1-4D1D-8BCE-D116908FC6FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92B70EFF-C1B1-4D1D-8BCE-D116908FC6FF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92B70EFF-C1B1-4D1D-8BCE-D116908FC6FF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -778,9 +783,10 @@ Global {575BEFA1-19C2-49B1-8D31-B5D4472328DE} = {447C8A77-E5F0-4538-8687-7383196D04EA} {6C161F55-54B6-42A5-B177-3B0ED50323C1} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {46C6336C-A1D8-4858-98CE-6F4C698C5A77} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {69168816-4394-4DDA-BB6B-C21983D37F0B} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {43D5FE61-ECBF-4B16-AD95-0043E18EB93A} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {E9E1714F-7ED2-4BD1-BA4A-BA06E398288A} = {447C8A77-E5F0-4538-8687-7383196D04EA} - {69168816-4394-4DDA-BB6B-C21983D37F0B} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {92B70EFF-C1B1-4D1D-8BCE-D116908FC6FF} = {447C8A77-E5F0-4538-8687-7383196D04EA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} diff --git a/framework/src/Volo.Abp.Cli/Program.cs b/framework/src/Volo.Abp.Cli/Program.cs deleted file mode 100644 index 5e9dcd4006..0000000000 --- a/framework/src/Volo.Abp.Cli/Program.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Volo.Abp.Cli -{ - public class Program - { - private static void Main(string[] args) - { - Console.WriteLine("Welcome to ABP CLI..! This tool is in development. There is no functionality yet. So, bye bye... ;)"); - } - } -} diff --git a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj index 29b80cb98a..fb8b3b9e19 100644 --- a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj +++ b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj @@ -7,6 +7,18 @@ netcoreapp2.2 true abp + + + + + + + + + + + + diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs new file mode 100644 index 0000000000..0b891e1299 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain; +using Volo.Abp.Modularity; + +namespace Volo.Abp.Cli +{ + [DependsOn( + typeof(AbpDddDomainModule) + )] + public class AbpCliModule : AbpModule + { + + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs new file mode 100644 index 0000000000..27108a76c4 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs @@ -0,0 +1,62 @@ +using System.Linq; +using System.Text; +using JetBrains.Annotations; +using Volo.Abp.Cli.Args; + +namespace Volo.Abp.Cli +{ + public class CommandLineArgs + { + [CanBeNull] + public string Command { get; } + + [CanBeNull] + public string Target { get; } + + [NotNull] + public CommandLineOptions Options { get; } + + public CommandLineArgs([CanBeNull] string command = null, [CanBeNull] string target = null) + { + Command = command; + Target = target; + Options = new CommandLineOptions(); + } + + public static CommandLineArgs Empty() + { + return new CommandLineArgs(); + } + + public override string ToString() + { + var sb = new StringBuilder(); + + if (Command != null) + { + sb.AppendLine($"Command: {Command}"); + } + + if (Target != null) + { + sb.AppendLine($"Target: {Target}"); + } + + if (Options.Any()) + { + sb.AppendLine("Options:"); + foreach (var option in Options) + { + sb.AppendLine($" - {option.Key} = {option.Value}"); + } + } + + if (sb.Length <= 0) + { + sb.Append(""); + } + + return sb.ToString(); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgumentParser.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgumentParser.cs new file mode 100644 index 0000000000..7125699546 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgumentParser.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli.Args +{ + public class CommandLineArgumentParser : ICommandLineArgumentParser, ITransientDependency + { + public CommandLineArgs Parse(string[] args) + { + if (args.IsNullOrEmpty()) + { + return CommandLineArgs.Empty(); + } + + var argumentList = args.ToList(); + + //Get command + + var command = argumentList[0]; + argumentList.RemoveAt(0); + + if (!argumentList.Any()) + { + return new CommandLineArgs(command); + } + + //Get target + + var target = argumentList[0]; + if (target.StartsWith("-")) + { + target = null; + } + else + { + argumentList.RemoveAt(0); + } + + if (!argumentList.Any()) + { + return new CommandLineArgs(command, target); + } + + //Get options + + var commandLineArgs = new CommandLineArgs(command, target); + + while (argumentList.Any()) + { + var optionName = ParseOptionName(argumentList[0]); + argumentList.RemoveAt(0); + + if (!argumentList.Any()) + { + commandLineArgs.Options[optionName] = null; + break; + } + + if (IsOptionName(argumentList[0])) + { + commandLineArgs.Options[optionName] = null; + continue; + } + + commandLineArgs.Options[optionName] = argumentList[0]; + argumentList.RemoveAt(0); + } + + return commandLineArgs; + } + + private static bool IsOptionName(string argument) + { + return argument.StartsWith("-") || argument.StartsWith("--"); + } + + private static string ParseOptionName(string argument) + { + if (argument.StartsWith("--")) + { + if (argument.Length <= 2) + { + throw new ArgumentException("Should specify an option name after '--' prefix!"); + } + + return argument.RemovePreFix("--"); + } + + if (argument.StartsWith("-")) + { + if (argument.Length <= 1) + { + throw new ArgumentException("Should specify an option name after '--' prefix!"); + } + + return argument.RemovePreFix("-"); + } + + throw new ArgumentException("Option names should start with '-' or '--'."); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineOptions.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineOptions.cs new file mode 100644 index 0000000000..93f23fdd76 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineOptions.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace Volo.Abp.Cli.Args +{ + public class CommandLineOptions : Dictionary + { + + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/ICommandLineArgumentParser.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/ICommandLineArgumentParser.cs new file mode 100644 index 0000000000..c467541210 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/ICommandLineArgumentParser.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.Cli.Args +{ + public interface ICommandLineArgumentParser + { + CommandLineArgs Parse(string[] args); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs new file mode 100644 index 0000000000..6c51b0cd30 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs @@ -0,0 +1,29 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Cli.Args; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli +{ + public class CliService : ITransientDependency + { + protected ICommandLineArgumentParser CommandLineArgumentParser { get; } + protected ICommandSelector CommandSelector { get; } + + public CliService( + ICommandLineArgumentParser commandLineArgumentParser, + ICommandSelector commandSelector) + { + CommandLineArgumentParser = commandLineArgumentParser; + CommandSelector = commandSelector; + } + + public async Task RunAsync(string[] args) + { + var commandLineArgs = CommandLineArgumentParser.Parse(args); + var command = CommandSelector.Select(commandLineArgs); + await command.ExecuteAsync(); + Console.WriteLine(commandLineArgs); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs new file mode 100644 index 0000000000..c5d410f400 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs @@ -0,0 +1,20 @@ +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli +{ + public class CommandSelector : ICommandSelector, ITransientDependency + { + public IConsoleCommand Select(CommandLineArgs commandLineArgs) + { + //TODO: Create options to define commands + //TODO: Get from dependency injection instead of new? + + if (commandLineArgs.Command == "new") + { + return new NewProjectCommand(commandLineArgs); + } + + return new MainHelpCommand(commandLineArgs); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs new file mode 100644 index 0000000000..86d2f1d2f0 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.Cli +{ + public interface ICommandSelector + { + IConsoleCommand Select(CommandLineArgs commandLineArgs); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs new file mode 100644 index 0000000000..a3e822a160 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace Volo.Abp.Cli +{ + public interface IConsoleCommand + { + Task ExecuteAsync(); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs new file mode 100644 index 0000000000..5bb1894229 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Threading.Tasks; + +namespace Volo.Abp.Cli +{ + public class MainHelpCommand : IConsoleCommand + { + public MainHelpCommand(CommandLineArgs commandLineArgs) + { + + } + + public Task ExecuteAsync() + { + Console.WriteLine("*********** ABP CLI ****************"); + Console.WriteLine(); + Console.WriteLine("Usage:"); + Console.WriteLine(); + Console.WriteLine(" abp [options]"); + return Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs new file mode 100644 index 0000000000..5ef068e5ae --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -0,0 +1,21 @@ +using System; +using System.Threading.Tasks; + +namespace Volo.Abp.Cli +{ + public class NewProjectCommand : IConsoleCommand + { + protected CommandLineArgs CommandLineArgs { get; } + + public NewProjectCommand(CommandLineArgs commandLineArgs) + { + CommandLineArgs = commandLineArgs; + } + + public Task ExecuteAsync() + { + Console.WriteLine("TODO: Create new project"); + return Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs new file mode 100644 index 0000000000..c7f321a8e1 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs @@ -0,0 +1,24 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Threading; + +namespace Volo.Abp.Cli +{ + public class Program + { + private static void Main(string[] args) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + AsyncHelper.RunSync( + () => application.ServiceProvider + .GetRequiredService() + .RunAsync(args) + ); + + application.Shutdown(); + } + } + } +} diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs new file mode 100644 index 0000000000..1e2e4efc00 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs @@ -0,0 +1,9 @@ +namespace Volo.Abp.SolutionTemplating.Building +{ + public enum DatabaseProvider : byte + { + Irrelevant = 0, + EntityFrameworkCore = 1, + MongoDb = 2 + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs new file mode 100644 index 0000000000..f9d8812076 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs @@ -0,0 +1,25 @@ +using System; + +namespace Volo.Abp.SolutionTemplating.Building +{ + public class GithubRepositoryInfo + { + public string RepositoryNameWithOrganization { get; } + + public string RepositoryName { get; } + + public string AccessToken { get; } + + public GithubRepositoryInfo(string repositoryNameWithOrganization, string accessToken) + { + if (!repositoryNameWithOrganization.Contains("/")) + { + throw new ApplicationException($"{nameof(repositoryNameWithOrganization)} '{repositoryNameWithOrganization}' is not valid! It should be formatted as 'organization-name/repository-name'." ); + } + + RepositoryNameWithOrganization = repositoryNameWithOrganization; + RepositoryName = repositoryNameWithOrganization.Split('/')[1]; + AccessToken = accessToken; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs new file mode 100644 index 0000000000..297e7f056f --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs @@ -0,0 +1,29 @@ +using JetBrains.Annotations; +using Volo.Abp.SolutionTemplating.Files; + +namespace Volo.Abp.SolutionTemplating.Building +{ + public class ProjectBuildContext + { + public ProjectBuildRequest Request { get; } + + public string TemplatesFolder { get; } + + public TemplateInfo Template { get; } + + public FileEntryList Files { get; set; } + + public ProjectResult Result { get; set; } + + public ProjectBuildContext( + [NotNull] TemplateInfo template, + ProjectBuildRequest request, + string templatesFolder) + { + Template = Check.NotNull(template, nameof(template)); + Request = request; + TemplatesFolder = templatesFolder; + Result = new ProjectResult(); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs new file mode 100644 index 0000000000..7178a24238 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs @@ -0,0 +1,20 @@ +using System; +using System.Linq; +using Volo.Abp.SolutionTemplating.Files; + +namespace Volo.Abp.SolutionTemplating.Building +{ + public static class ProjectBuildContextExtensions + { + public static FileEntry GetFile(this ProjectBuildContext context, string filePath) + { + var file = context.Files.FirstOrDefault(f => f.Name == filePath); + if (file == null) + { + throw new ApplicationException("Could not find file: " + filePath); + } + + return file; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs new file mode 100644 index 0000000000..3e2e617517 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; + +namespace Volo.Abp.SolutionTemplating.Building +{ + public class ProjectBuildPipeline + { + public List Steps { get; } + + public ProjectBuildPipeline() + { + Steps = new List(); + } + + public void Execute(ProjectBuildContext context) + { + foreach (var step in Steps) + { + step.Execute(context); + } + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs new file mode 100644 index 0000000000..41d760e4df --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs @@ -0,0 +1,22 @@ +using Volo.Abp.SolutionTemplating.Building.Steps; + +namespace Volo.Abp.SolutionTemplating.Building +{ + public static class ProjectBuildPipelineBuilder + { + public static ProjectBuildPipeline Build(ProjectBuildContext context) + { + var pipeline = new ProjectBuildPipeline(); + + pipeline.Steps.Add(new GithubDownloadStep()); + pipeline.Steps.Add(new FileEntryListReadStep()); + pipeline.Steps.AddRange(context.Template.GetCustomSteps(context)); + pipeline.Steps.Add(new NugetReferenceReplaceStep()); + pipeline.Steps.Add(new TemplateCodeDeleteStep()); + pipeline.Steps.Add(new SolutionRenameStep()); + pipeline.Steps.Add(new CreateProjectResultZipStep()); + + return pipeline; + } + } +} diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs new file mode 100644 index 0000000000..d6ec90325f --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.SolutionTemplating.Building +{ + public abstract class ProjectBuildPipelineStep + { + public abstract void Execute(ProjectBuildContext context); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs new file mode 100644 index 0000000000..4f4bec11b8 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs @@ -0,0 +1,23 @@ +namespace Volo.Abp.SolutionTemplating.Building +{ + public class ProjectBuildRequest + { + public SolutionName SolutionName { get; } + + public DatabaseProvider DatabaseProvider { get; } + + public string Version { get; } + + public bool ReplaceLocalReferencesToNuget { get; set; } + + public ProjectBuildRequest( + SolutionName solutionName, + DatabaseProvider databaseProvider, + string version) + { + SolutionName = solutionName; + DatabaseProvider = databaseProvider; + Version = version; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs new file mode 100644 index 0000000000..3afc3e1a17 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.SolutionTemplating.Building +{ + public class ProjectResult + { + public byte[] ZipContent { get; set; } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs new file mode 100644 index 0000000000..88f2558e58 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs @@ -0,0 +1,23 @@ +using Ionic.Zip; +using Volo.Abp.SolutionTemplating.Files; +using Volo.Abp.SolutionTemplating.Zipping; + +namespace Volo.Abp.SolutionTemplating.Building.Steps +{ + public class CreateProjectResultZipStep : ProjectBuildPipelineStep + { + public override void Execute(ProjectBuildContext context) + { + context.Result.ZipContent = CreateZipFileFromEntries(context.Files); + } + + private static byte[] CreateZipFileFromEntries(FileEntryList entries) + { + using (var resultZipFile = new ZipFile()) + { + entries.CopyToZipFile(resultZipFile); + return resultZipFile.GetBytes(); + } + } + } +} diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs new file mode 100644 index 0000000000..62ec0d9f66 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs @@ -0,0 +1,58 @@ +using System.IO; +using Ionic.Zip; +using Volo.Abp.SolutionTemplating.Files; +using Volo.Abp.SolutionTemplating.Zipping; + +namespace Volo.Abp.SolutionTemplating.Building.Steps +{ + public class FileEntryListReadStep : ProjectBuildPipelineStep + { + public override void Execute(ProjectBuildContext context) + { + if (context.Template.RootPathInZipFile == null) + { + context.Files = GetEntriesFromZipFile(context.Template.FilePath); + return; + } + + var entryListCachePath = CreateCachePath(context); + + if (File.Exists(entryListCachePath)) + { + context.Files = GetEntriesFromZipFile(entryListCachePath); + return; + } + + context.Files = GetEntriesFromZipFile( + context.Template.FilePath, + context.Template.RootPathInZipFile); + + SaveCachedEntries(entryListCachePath, context.Files); + } + + private static FileEntryList GetEntriesFromZipFile(string filePath, string rootFolder = null) + { + using (var templateFileStream = File.OpenRead(filePath)) + { + using (var templateZipFile = ZipFile.Read(templateFileStream)) + { + return templateZipFile.ToFileEntryList(rootFolder); + } + } + } + + private static void SaveCachedEntries(string filePath, FileEntryList entries) + { + using (var resultZipFile = new ZipFile()) + { + entries.CopyToZipFile(resultZipFile); + resultZipFile.Save(filePath); + } + } + + private string CreateCachePath(ProjectBuildContext context) + { + return context.Template.FilePath.Replace(".zip", "-filtered.zip"); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs new file mode 100644 index 0000000000..d34c67ec66 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs @@ -0,0 +1,33 @@ +using System; +using System.IO; +using Volo.Abp.SolutionTemplating.Github; + +namespace Volo.Abp.SolutionTemplating.Building.Steps +{ + public class GithubDownloadStep : ProjectBuildPipelineStep + { + public override void Execute(ProjectBuildContext context) + { + var githubManager = new GithubManager(); + + context.Template.Version = githubManager.GetVersion(context); + + context.Template.FilePath = Path.Combine( + context.TemplatesFolder, + $"{context.Template.Name}-{context.Template.Version}.zip" + ); + + context.Template.RootPathInZipFile = context.Template.GithubRepository.RepositoryName + "-" + context.Template.Version.RemovePreFix("v") + context.Template.RootPathInZipFile; + + try + { + githubManager.DownloadIfNotExist(context); + } + catch (Exception e) + { + throw e; //TODO: !!! + //var existingVersion = githubManager.GetExistingVersion(context); + } + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs new file mode 100644 index 0000000000..7336dbd397 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs @@ -0,0 +1,113 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using HtmlAgilityPack; +using Volo.Abp.SolutionTemplating.Files; + +namespace Volo.Abp.SolutionTemplating.Building.Steps +{ + public class NugetReferenceReplaceStep : ProjectBuildPipelineStep + { + public override void Execute(ProjectBuildContext context) + { + new NugetReferenceReplacer( + context.Files, + "MyCompanyName", + "MyProjectName", + context.Template.Version + ).Run(); + } + + private class NugetReferenceReplacer + { + private readonly List _entries; + private readonly string _companyNamePlaceHolder; + private readonly string _projectNamePlaceHolder; + private readonly string _latestNugetPackageVersion; + + public NugetReferenceReplacer(List entries, string companyNamePlaceHolder, string projectNamePlaceHolder, string latestNugetPackageVersion) + { + _entries = entries; + _companyNamePlaceHolder = companyNamePlaceHolder; + _projectNamePlaceHolder = projectNamePlaceHolder; + _latestNugetPackageVersion = latestNugetPackageVersion; + } + + public void Run() + { + foreach (var fileEntry in _entries) + { + if (fileEntry.Name.EndsWith(".csproj")) + { + fileEntry.SetContent(ProcessFileContent(fileEntry.Content)); + } + } + } + + private string ProcessFileContent(string content) + { + Check.NotNull(content, nameof(content)); + + var doc = new HtmlDocument(); + + doc.Load(GenerateStreamFromString(content)); + + var nodes = doc.DocumentNode.SelectNodes("//projectreference[@include]"); + + if (nodes == null) + { + return content; + } + + return ProcessReferenceNodes(nodes, content); + } + + private string ProcessReferenceNodes(HtmlNodeCollection nodes, string content) + { + Check.NotNull(nodes, nameof(nodes)); + Check.NotNull(content, nameof(content)); + + foreach (var node in nodes) + { + var valueAttr = node.Attributes.FirstOrDefault(a => a.Name.ToLower() == "include"); + + // ReSharper disable once PossibleNullReferenceException : Can not be null because nodes are selected with include attribute filter in previous method + if (valueAttr.Value.Contains($"{_companyNamePlaceHolder}.{_projectNamePlaceHolder}")) + { + continue; + } + + var newValue = ConvertToNugetReference(valueAttr.Value); + + var oldLine = $" file.Name.StartsWith(_projectFolderPath)); + var solutionFile = context.GetFile(_solutionFilePath); + solutionFile.NormalizeLineEndings(); + solutionFile.SetLines(RemoveProject(solutionFile.GetLines().ToList())); + } + + private List RemoveProject(List solutionFileLines) + { + var projectKey = FindProjectKey(solutionFileLines); + var newSolutionFileLines = new List(); + var firstOccurence = true; + + for (var i = 0; i < solutionFileLines.Count; ++i) + { + if (solutionFileLines[i].Contains(projectKey)) + { + if (firstOccurence) + { + firstOccurence = false; + ++i; //Skip "EndProject" line too. + } + + continue; + } + + newSolutionFileLines.Add(solutionFileLines[i]); + } + + return newSolutionFileLines; + } + + private string FindProjectKey(List solutionFileLines) + { + foreach (var solutionFileLine in solutionFileLines) + { + if (solutionFileLine.Contains(_projectName)) + { + var curlyBracketStartIndex = solutionFileLine.LastIndexOf("{", StringComparison.OrdinalIgnoreCase); + var curlyBracketEndIndex = solutionFileLine.LastIndexOf("}", StringComparison.OrdinalIgnoreCase); + return solutionFileLine.Substring(curlyBracketStartIndex + 1, curlyBracketEndIndex - curlyBracketStartIndex - 1); + } + } + + throw new ApplicationException($"The solution file '{_solutionFilePath}' does not contain a project '{_projectName}'"); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs new file mode 100644 index 0000000000..a45fabfd5b --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Volo.Abp.SolutionTemplating.Files; + +namespace Volo.Abp.SolutionTemplating.Building.Steps +{ + public class SolutionRenameStep : ProjectBuildPipelineStep + { + public override void Execute(ProjectBuildContext context) + { + new SolutionRenamer( + context.Files, + "MyCompanyName", + "MyProjectName", + context.Request.SolutionName.CompanyName, + context.Request.SolutionName.ProjectName + ).Run(); + } + + private class SolutionRenamer + { + private readonly List _entries; + private readonly string _companyNamePlaceHolder; + private readonly string _projectNamePlaceHolder; + + private readonly string _companyName; + private readonly string _projectName; + + public SolutionRenamer(List entries, string companyNamePlaceHolder, string projectNamePlaceHolder, string companyName, string projectName) + { + if (string.IsNullOrWhiteSpace(companyName)) + { + companyName = null; + } + + if (companyNamePlaceHolder == null && companyName != null) + { + throw new UserFriendlyException($"Can not set {nameof(companyName)} if {nameof(companyNamePlaceHolder)} is null."); + } + + _entries = entries; + + _companyNamePlaceHolder = companyNamePlaceHolder; + _projectNamePlaceHolder = projectNamePlaceHolder ?? throw new ArgumentNullException(nameof(projectNamePlaceHolder)); + + _companyName = companyName; + _projectName = projectName ?? throw new ArgumentNullException(nameof(projectName)); + } + + public void Run() + { + if (_companyNamePlaceHolder != null && _companyName != null) + { + RenameDirectoryRecursively(_companyNamePlaceHolder, _companyName); + RenameAllFiles(_companyNamePlaceHolder, _companyName); + ReplaceContent(_companyNamePlaceHolder, _companyName); + } + else if (_companyNamePlaceHolder != null) + { + RenameDirectoryRecursively(_companyNamePlaceHolder + "." + _projectNamePlaceHolder, _projectNamePlaceHolder); + RenameAllFiles(_companyNamePlaceHolder + "." + _projectNamePlaceHolder, _projectNamePlaceHolder); + ReplaceContent(_companyNamePlaceHolder + "." + _projectNamePlaceHolder, _projectNamePlaceHolder); + } + + RenameDirectoryRecursively(_projectNamePlaceHolder, _projectName); + RenameAllFiles(_projectNamePlaceHolder, _projectName); + ReplaceContent(_projectNamePlaceHolder, _projectName); + } + + private void RenameDirectoryRecursively(string placeHolder, string name) + { + foreach (var entry in _entries.Where(e => e.IsDirectory)) + { + if (entry.Name.Contains(placeHolder)) + { + entry.SetName(entry.Name.Replace(placeHolder, name)); + } + } + } + + private void RenameAllFiles(string placeHolder, string name) + { + foreach (var entry in _entries.Where(e => !e.IsDirectory)) + { + if (entry.Name.Contains(placeHolder)) + { + entry.SetName(entry.Name.Replace(placeHolder, name)); + } + } + } + + private void ReplaceContent(string placeHolder, string name) + { + foreach (var entry in _entries.Where(e => !e.IsDirectory)) + { + if (entry.Content.Length < placeHolder.Length) + { + continue; + } + + if (entry.IsBinaryFile) + { + continue; + } + + var newContent = entry.Content.Replace(placeHolder, name); + if (newContent != entry.Content) + { + entry.SetContent(newContent); + } + } + } + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs new file mode 100644 index 0000000000..64e1b44c11 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs @@ -0,0 +1,80 @@ +using System; +using Volo.Abp.SolutionTemplating.Files; + +namespace Volo.Abp.SolutionTemplating.Building.Steps +{ + public class SwitchEntityFrameworkCoreToMongoDbStep : ProjectBuildPipelineStep + { + public override void Execute(ProjectBuildContext context) + { + ChangeProjectReference(context); + ChangeWebModuleUsage(context); + ChangeConnectionString(context); + } + + private void ChangeProjectReference(ProjectBuildContext context) + { + var file = context.GetFile("/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj"); + + file.NormalizeLineEndings(); + + var lines = file.GetLines(); + for (var i = 0; i < lines.Length; i++) + { + if (lines[i].Contains("ProjectReference") && lines[i].Contains("MyCompanyName.MyProjectName.EntityFrameworkCore")) + { + lines[i] = lines[i].Replace("EntityFrameworkCore", "MongoDB"); + file.SetLines(lines); + return; + } + } + + throw new ApplicationException("Could not find the EntityFrameworkCore reference in the MyCompanyName.MyProjectName.Web.csproj!"); + } + + private void ChangeWebModuleUsage(ProjectBuildContext context) + { + var file = context.GetFile("/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs"); + + file.NormalizeLineEndings(); + + file.RemoveTemplateCodeIfNot("EntityFrameworkCore"); + + var lines = file.GetLines(); + + for (var i = 0; i < lines.Length; i++) + { + if (lines[i].Contains("using MyCompanyName.MyProjectName.EntityFrameworkCore")) + { + lines[i] = "using MyCompanyName.MyProjectName.MongoDb;"; + } + else if (lines[i].Contains("MyProjectNameEntityFrameworkCoreModule")) + { + lines[i] = lines[i].Replace("MyProjectNameEntityFrameworkCoreModule", "MyProjectNameMongoDbModule"); + } + } + + file.SetLines(lines); + } + + private void ChangeConnectionString(ProjectBuildContext context) + { + var file = context.GetFile("/src/MyCompanyName.MyProjectName.Web/appsettings.json"); + + file.NormalizeLineEndings(); + + var lines = file.GetLines(); + for (var i = 0; i < lines.Length; i++) + { + if (lines[i].Contains("Default") && lines[i].Contains("Database")) + { + lines[i] = " \"Default\": \"mongodb://localhost:27017|MyProjectName\""; + file.SetLines(lines); + return; + } + } + + throw new ApplicationException("Could not find the 'Default' connection string in appsettings.json file!"); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs new file mode 100644 index 0000000000..e35e11d441 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs @@ -0,0 +1,19 @@ +using Volo.Abp.SolutionTemplating.Files; + +namespace Volo.Abp.SolutionTemplating.Building.Steps +{ + public class TemplateCodeDeleteStep : ProjectBuildPipelineStep + { + public override void Execute(ProjectBuildContext context) + { + foreach (var file in context.Files) + { + if (file.Name.EndsWith(".cs")) //TODO: Why only cs! + { + file.RemoveTemplateCode(); + file.RemoveTemplateCodeMarkers(); + } + } + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs new file mode 100644 index 0000000000..0bdccd3d00 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; + +namespace Volo.Abp.SolutionTemplating.Building +{ + public abstract class TemplateInfo + { + public string Name { get; set; } + + public GithubRepositoryInfo GithubRepository { get; } + + public string FilePath { get; set; } + + public string RootPathInZipFile { get; set; } + + public string Version { get; set; } + + protected TemplateInfo( + string name, + GithubRepositoryInfo githubRepository, + string rootPathInZipFile) + { + Name = name; + GithubRepository = githubRepository; + RootPathInZipFile = rootPathInZipFile; + } + + public virtual IEnumerable GetCustomSteps(ProjectBuildContext context) + { + return Array.Empty(); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/DownloadInfo.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/DownloadInfo.cs new file mode 100644 index 0000000000..0865e1175c --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/DownloadInfo.cs @@ -0,0 +1,37 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.SolutionTemplating.Building; + +namespace Volo.Abp.SolutionTemplating +{ + [Table("Downloads")] + public class DownloadInfo : CreationAuditedAggregateRoot + { + [Required] + [StringLength(128)] + public string ProjectName { get; set; } + + [Required] + [StringLength(42)] + public string TemplateName { get; set; } + + [Required] + public DatabaseProvider DatabaseProvider { get; set; } + + [Required] + [StringLength(20)] + public string Version { get; set; } + + public int CreationDuration { get; set; } + + public DownloadInfo(string projectName, string templateName, DatabaseProvider databaseProvider, string version, int creationDuration) + { + ProjectName = projectName; + TemplateName = templateName; + DatabaseProvider = databaseProvider; + Version = version; + CreationDuration = creationDuration; + } + } +} diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntry.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntry.cs new file mode 100644 index 0000000000..7f808ad4cf --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntry.cs @@ -0,0 +1,126 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Volo.Abp.SolutionTemplating.Files +{ + public class FileEntry + { + private static string[] BinaryFileExtensions = { + ".exe", ".dll", ".bin", + ".suo", ".obj", ".pdb", + ".png", "jpg", "jpeg", ".ico" + ,".woff", ".woff2", ".eot", ".svg", ".ttf" + }; + + public string Name { get; private set; } + + public bool IsDirectory { get; } + + public Encoding Encoding { get; } + + public byte[] Bytes { get; private set; } + + public string Content { get; private set; } + + public bool IsBinaryFile { get; private set; } + + public FileEntry(string name, byte[] bytes, bool isDirectory) + { + Name = name; + Bytes = bytes; + IsDirectory = isDirectory; + + Encoding = CalculateEncoding(); + Content = Encoding.GetString(bytes); + IsBinaryFile = CalculateIsBinaryFile(); + } + + public void SetContent(string fileContent) + { + Content = fileContent; + Bytes = Encoding.GetBytes(fileContent); + } + + public string[] GetLines() + { + return Content.Split(new[] { Environment.NewLine, "\n" }, StringSplitOptions.None); + } + + public void SetLines(IEnumerable lines) + { + SetContent(lines.JoinAsString(Environment.NewLine)); + } + + public void SetName(string fileName) + { + Name = fileName; + IsBinaryFile = CalculateIsBinaryFile(); + } + + public void NormalizeLineEndings() + { + if (Content.IsNullOrEmpty()) + { + return; + } + + SetContent(Content.NormalizeLineEndings()); + } + + public override string ToString() + { + var str = new StringBuilder(Name); + + if (IsDirectory) + { + str.Append(" [DIR]"); + } + + str.Append($" [{Bytes.Length}]"); + + return str.ToString(); + } + + private Encoding CalculateEncoding() + { + if (Bytes.IsNullOrEmpty()) + { + return Encoding.ASCII; + } + + if (Bytes[0] == 0x2b && Bytes[1] == 0x2f && Bytes[2] == 0x76) + { + return Encoding.UTF7; + } + + if (Bytes[0] == 0xef && Bytes[1] == 0xbb && Bytes[2] == 0xbf) + { + return Encoding.UTF8; + } + + if (Bytes[0] == 0xff && Bytes[1] == 0xfe) + { + return Encoding.Unicode; //UTF-16LE + } + + if (Bytes[0] == 0xfe && Bytes[1] == 0xff) + { + return Encoding.BigEndianUnicode; //UTF-16BE + } + + if (Bytes[0] == 0 && Bytes[1] == 0 && Bytes[2] == 0xfe && Bytes[3] == 0xff) + { + return Encoding.UTF32; + } + + return Encoding.UTF8; + } + + private bool CalculateIsBinaryFile() + { + return BinaryFileExtensions.Any(ext => Name.EndsWith(ext)); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs new file mode 100644 index 0000000000..999e8a9353 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs @@ -0,0 +1,81 @@ +using System.Collections.Generic; + +namespace Volo.Abp.SolutionTemplating.Files +{ + public static class FileEntryExtensions + { + public static void RemoveTemplateCode(this FileEntry file) + { + RemoveMarkedTemplateCode(file, ""); + } + + public static void RemoveTemplateCodeIf(this FileEntry file, string condition) + { + RemoveByCondition(file, "IF", condition); + } + + public static void RemoveTemplateCodeIfNot(this FileEntry file, string condition) + { + RemoveByCondition(file, "IF-NOT", condition); + } + + public static void RemoveTemplateCodeMarkers(this FileEntry file) + { + file.NormalizeLineEndings(); + + var lines = file.GetLines(); + var newLines = new List(); + + for (int i = 0; i < lines.Length; i++) + { + if (lines[i].Contains("")) + { + //TODO: What if we use inline like: some-code + //TODO: This logic skips the code in that case. Should handle it + ++i; + } + + if (i < lines.Length) + { + newLines.Add(lines[i]); + } + } + + file.SetLines(newLines); + } + + private static void RemoveByCondition(this FileEntry file, string conditionName, string condition) + { + RemoveMarkedTemplateCode(file, $""); + } + + private static void RemoveMarkedTemplateCode(this FileEntry file, string beginMark) + { + file.NormalizeLineEndings(); + + var lines = file.GetLines(); + var newLines = new List(); + + for (int i = 0; i < lines.Length; i++) + { + if (lines[i].Contains(beginMark)) + { + while (!lines[i].Contains("") && i < lines.Length) + { + ++i; + } + + ++i; + } + + if (i < lines.Length) + { + newLines.Add(lines[i]); + } + } + + file.SetLines(newLines); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs new file mode 100644 index 0000000000..17b7b757ba --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace Volo.Abp.SolutionTemplating.Files +{ + public class FileEntryList : List + { + public FileEntryList(IEnumerable entries) + : base(entries) + { + + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs new file mode 100644 index 0000000000..01acdf297b --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs @@ -0,0 +1,24 @@ +using System; +using Ionic.Zip; + +namespace Volo.Abp.SolutionTemplating.Files +{ + public static class FileEntryListExtensions + { + public static void CopyToZipFile(this FileEntryList fileEntryList, ZipFile zipFile) + { + foreach (var entry in fileEntryList) + { + try + { + zipFile.AddEntry(entry.Name, entry.Bytes); + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubManager.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubManager.cs new file mode 100644 index 0000000000..fbe0801ffd --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubManager.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using Newtonsoft.Json; +using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.Threading; + +namespace Volo.Abp.SolutionTemplating.Github +{ + public class GithubManager + { + private static readonly object LockObject = new object(); + + public string GetVersion(ProjectBuildContext context) + { + if (context.Request.Version.StartsWith("Branch:", StringComparison.OrdinalIgnoreCase)) + { + //TODO: Should not cache branch files! + return context.Request.Version.Substring("Branch:".Length); + } + + var url = "https://api.github.com/repos/" + context.Template.GithubRepository.RepositoryNameWithOrganization + "/releases"; + + using (var client = new System.Net.Http.HttpClient()) + { + var credentials = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}:", context.Template.GithubRepository.AccessToken); + credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials)); + + client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials); + client.Timeout = TimeSpan.FromMinutes(30); + + client.DefaultRequestHeaders.UserAgent.ParseAdd("MyAgent/1.0"); + var releases = JsonConvert.DeserializeObject>(client.GetStringAsync(url).Result); + + if (context.Request.Version == StandardVersions.LatestUnstable) + { + return releases.FirstOrDefault(r => !r.IsPrerelease)?.Name; + } + + return releases.FirstOrDefault()?.Name; + } + } + + public void DownloadIfNotExist(ProjectBuildContext context) + { + using (var client = new System.Net.Http.HttpClient()) + { + if (File.Exists(context.Template.FilePath)) + { + return; + } + + lock (LockObject) + { + if (File.Exists(context.Template.FilePath)) + { + return; + } + + var downloadUrl = "https://github.com/" + context.Template.GithubRepository.RepositoryNameWithOrganization + "/archive/" + context.Template.Version + ".zip"; + + var credentials = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}:", context.Template.GithubRepository.AccessToken); + credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials)); + + client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials); + client.Timeout = TimeSpan.FromMinutes(30); + + var fileContents = AsyncHelper.RunSync(() => client.GetByteArrayAsync(downloadUrl)); + + File.WriteAllBytes(context.Template.FilePath, fileContents); + } + } + } + + //public string GetExistingVersion(ProjectBuildContext context) + //{ + // var directoryInfo = new DirectoryInfo(templateRootPath); + // var existingFileName = directoryInfo.GetFiles().FirstOrDefault(f => f.Name.StartsWith(repositoryName))?.Name; + // var latestVersion = ""; + + // if (existingFileName != null) + // { + // var pFrom = existingFileName.IndexOf(repositoryName + "-", StringComparison.Ordinal) + (repositoryName + "-").Length; + // var pTo = existingFileName.LastIndexOf(".zip", StringComparison.Ordinal); + + // latestVersion = existingFileName.Substring(pFrom, pTo - pFrom); + // } + + // return latestVersion; + //} + } +} diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs new file mode 100644 index 0000000000..4e5ea612fe --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs @@ -0,0 +1,21 @@ +using System; +using Newtonsoft.Json; + +namespace Volo.Abp.SolutionTemplating.Github +{ + [JsonObject] + public class GithubRelease + { + [JsonProperty("id")] + public int Id { get; set; } + + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("prerelease")] + public bool IsPrerelease { get; set; } + + [JsonProperty("published_at")] + public DateTime PublishTime { get; set; } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs new file mode 100644 index 0000000000..77628e9767 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs @@ -0,0 +1,15 @@ +namespace Volo.Abp.SolutionTemplating +{ + public class SolutionBuildResult + { + public byte[] ZipContent { get; } + + public string ProjectName { get; } + + public SolutionBuildResult(byte[] zipContent, string projectName) + { + ZipContent = zipContent; + ProjectName = projectName; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuilder.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuilder.cs new file mode 100644 index 0000000000..736ffad678 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuilder.cs @@ -0,0 +1,64 @@ +using System; +using System.Diagnostics; +using System.IO; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.SolutionTemplating.Building; + +namespace Volo.Abp.SolutionTemplating +{ + public class SolutionBuilder : ITransientDependency + { + private readonly IHostingEnvironment _hostingEnvironment; + private readonly IRepository _downloadRepository; + + public SolutionBuilder( + IHostingEnvironment hostingEnvironment, + IRepository downloadRepository) + { + _hostingEnvironment = hostingEnvironment; + _downloadRepository = downloadRepository; + } + + public async Task BuildAsync( + TemplateInfo template, + string companyAndProjectName, + DatabaseProvider databaseProvider, + string version, + bool replaceLocalReferencesToNuget) + { + var stopwatch = Stopwatch.StartNew(); + + var templateRootPath = Path.Combine(_hostingEnvironment.ContentRootPath, "TemplateFiles"); //TODO: To another folder that is not in the deployment folder! + var solutionName = SolutionName.Parse(companyAndProjectName); + + var context = new ProjectBuildContext( + template, + new ProjectBuildRequest( + solutionName, + databaseProvider, + version + ), + templateRootPath + ); + + ProjectBuildPipelineBuilder.Build(context).Execute(context); + + stopwatch.Stop(); + + await _downloadRepository.InsertAsync( + new DownloadInfo( + solutionName.FullName, + template.Name, + databaseProvider, + context.Template.Version, + Convert.ToInt32(stopwatch.Elapsed.TotalMilliseconds) + ) + ); + + return new SolutionBuildResult(context.Result.ZipContent, solutionName.ProjectName); + } + } +} diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionName.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionName.cs new file mode 100644 index 0000000000..63ec52a432 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionName.cs @@ -0,0 +1,50 @@ +using System; + +namespace Volo.Abp.SolutionTemplating +{ + public class SolutionName + { + public string FullName { get; } + + public string CompanyName { get; } + + public string ProjectName { get; } + + private SolutionName(string fullName, string companyName, string projectName) + { + FullName = fullName; + CompanyName = companyName; + ProjectName = projectName; + } + + public static SolutionName Parse(string fullName) + { + if (fullName.Length < 1) + { + throw new UserFriendlyException("Solution name is not valid. It should be 1 character length at minimum."); + } + + string companyName = null; + var projectName = fullName; + + if (fullName.Contains(".")) + { + var lastDotIndex = fullName.LastIndexOf(".", StringComparison.OrdinalIgnoreCase); + companyName = fullName.Substring(0, lastDotIndex); + projectName = fullName.Substring(lastDotIndex + 1); + + if (companyName.Length < 1) + { + throw new UserFriendlyException("Solution name is not valid. Company name should be 1 character length at minimum."); + } + + if (projectName.Length < 1) + { + throw new UserFriendlyException("Solution name is not valid. Project name should be 1 character length at minimum."); + } + } + + return new SolutionName(fullName, companyName, projectName); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/StandardVersions.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/StandardVersions.cs new file mode 100644 index 0000000000..df7b8b2e39 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/StandardVersions.cs @@ -0,0 +1,9 @@ +namespace Volo.Abp.SolutionTemplating +{ + public static class StandardVersions + { + public const string LatestStable = "LatestStable"; + + public const string LatestUnstable = "LatestUnstable"; + } +} diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs new file mode 100644 index 0000000000..e4e5290194 --- /dev/null +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Ionic.Zip; +using Volo.Abp.SolutionTemplating.Files; + +namespace Volo.Abp.SolutionTemplating.Zipping +{ + public static class ZipFileExtensions + { + public static byte[] GetBytes(this ZipFile zipFile) + { + using (var ms = new MemoryStream()) + { + zipFile.Save(ms); + return ms.ToArray(); + } + } + + public static FileEntryList ToFileEntryList(this ZipFile zipFile, string rootFolder = null) + { + var zipEntries = zipFile.Entries; + + if (rootFolder != null) + { + zipEntries = zipEntries.Where(entry => entry.FileName.StartsWith(rootFolder)).ToList(); + } + + var fileEntries = new List(); + + foreach (var zipEntry in zipEntries) + { + using (var entryStream = zipEntry.OpenReader()) + { + var fileName = zipEntry.FileName; + + if (rootFolder != null) + { + fileName = fileName.RemovePreFix(rootFolder); + } + + if (fileName.IsNullOrEmpty()) + { + continue; + } + + fileName = fileName.EnsureStartsWith('/'); + + fileEntries.Add(new FileEntry(fileName, entryStream.GetAllBytes(), zipEntry.IsDirectory)); + } + } + + return new FileEntryList(fileEntries); + } + } +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs index a4862789f2..8036760f6a 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs @@ -56,7 +56,7 @@ namespace Volo.Abp public virtual void Dispose() { - + //TODO: Shutdown if not done before? } protected virtual void SetServiceProvider(IServiceProvider serviceProvider) diff --git a/framework/test/Volo.Abp.Cli.Tests/Volo.Abp.Cli.Tests.csproj b/framework/test/Volo.Abp.Cli.Tests/Volo.Abp.Cli.Tests.csproj new file mode 100644 index 0000000000..915cb58607 --- /dev/null +++ b/framework/test/Volo.Abp.Cli.Tests/Volo.Abp.Cli.Tests.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp2.2 + latest + + + + + + + + + + diff --git a/framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/AbpCliTestBase.cs b/framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/AbpCliTestBase.cs new file mode 100644 index 0000000000..6f6393b7ae --- /dev/null +++ b/framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/AbpCliTestBase.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.Cli +{ + public class AbpCliTestBase : AbpIntegratedTest + { + + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/AbpCliTestModule.cs b/framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/AbpCliTestModule.cs new file mode 100644 index 0000000000..8c2101052b --- /dev/null +++ b/framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/AbpCliTestModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Modularity; + +namespace Volo.Abp.Cli +{ + [DependsOn( + typeof(AbpTestBaseModule), + typeof(AbpCliModule) + )] + public class AbpCliTestModule : AbpModule + { + + } +} diff --git a/framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/CommandLineArgumentParser_Tests.cs b/framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/CommandLineArgumentParser_Tests.cs new file mode 100644 index 0000000000..c8d31990cf --- /dev/null +++ b/framework/test/Volo.Abp.Cli.Tests/Volo/Abp/Cli/CommandLineArgumentParser_Tests.cs @@ -0,0 +1,68 @@ +using Shouldly; +using System.Linq; +using Volo.Abp.Cli.Args; +using Xunit; + +namespace Volo.Abp.Cli +{ + public class CommandLineArgumentParser_Tests : AbpCliTestBase + { + private readonly ICommandLineArgumentParser _commandLineArgumentParser; + + public CommandLineArgumentParser_Tests() + { + _commandLineArgumentParser = GetRequiredService(); + } + + [Theory] + [InlineData(null)] + [InlineData(new object[] { new string[0] })] + public void Should_Parse_Empty_Arguments(string[] args) + { + var commandLineArgs = _commandLineArgumentParser.Parse(args); + commandLineArgs.Command.ShouldBeNull(); + commandLineArgs.Target.ShouldBeNull(); + commandLineArgs.Options.Any().ShouldBeFalse(); + } + + [Fact] + public void Should_Work_With_Only_Command() + { + var commandLineArgs = _commandLineArgumentParser.Parse(new[] { "mycommand" }); + commandLineArgs.Command.ShouldBe("mycommand"); + commandLineArgs.Target.ShouldBeNull(); + commandLineArgs.Options.Any().ShouldBeFalse(); + } + + [Fact] + public void Should_Work_With_Command_And_Target() + { + var commandLineArgs = _commandLineArgumentParser.Parse(new[] { "mycommand", "mytarget" }); + commandLineArgs.Command.ShouldBe("mycommand"); + commandLineArgs.Target.ShouldBe("mytarget"); + commandLineArgs.Options.Any().ShouldBeFalse(); + } + + [Fact] + public void Should_Work_With_Command_And_Target_And_Options() + { + var commandLineArgs = _commandLineArgumentParser.Parse(new[] + { + "mycommand", "mytarget", "-a", "value1", "-b", "--optionC", "value2" + }); + + commandLineArgs.Command.ShouldBe("mycommand"); + commandLineArgs.Target.ShouldBe("mytarget"); + commandLineArgs.Options.Any().ShouldBeTrue(); + + commandLineArgs.Options.ShouldContainKey("a"); + commandLineArgs.Options["a"].ShouldBe("value1"); + + commandLineArgs.Options.ShouldContainKey("b"); + commandLineArgs.Options["b"].ShouldBeNull(); + + commandLineArgs.Options.ShouldContainKey("optionC"); + commandLineArgs.Options["optionC"].ShouldBe("value2"); + } + } +} From 3fa617b092cb14232e6c618a98fef87448f09b6b Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Thu, 18 Apr 2019 18:49:32 +0300 Subject: [PATCH 002/335] Fix namespaces --- .../Volo/Abp/Cli/Args/CommandLineArgs.cs | 3 +- .../Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs | 21 ++++++++---- .../Volo/Abp/Cli/Commands/CommandSelector.cs | 12 ++++--- .../Volo/Abp/Cli/Commands/ICommandSelector.cs | 7 ++-- .../Volo/Abp/Cli/Commands/IConsoleCommand.cs | 5 +-- .../Volo/Abp/Cli/Commands/MainHelpCommand.cs | 13 +++---- .../Abp/Cli/Commands/NewProjectCommand.cs | 34 +++++++++++++++---- 7 files changed, 63 insertions(+), 32 deletions(-) diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs index 27108a76c4..624c96afe5 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs @@ -1,9 +1,8 @@ using System.Linq; using System.Text; using JetBrains.Annotations; -using Volo.Abp.Cli.Args; -namespace Volo.Abp.Cli +namespace Volo.Abp.Cli.Args { public class CommandLineArgs { diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs index 6c51b0cd30..d76216b300 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs @@ -1,6 +1,8 @@ -using System; +using Microsoft.Extensions.DependencyInjection; +using System; using System.Threading.Tasks; using Volo.Abp.Cli.Args; +using Volo.Abp.Cli.Commands; using Volo.Abp.DependencyInjection; namespace Volo.Abp.Cli @@ -9,21 +11,28 @@ namespace Volo.Abp.Cli { protected ICommandLineArgumentParser CommandLineArgumentParser { get; } protected ICommandSelector CommandSelector { get; } + public IHybridServiceScopeFactory ServiceScopeFactory { get; } public CliService( - ICommandLineArgumentParser commandLineArgumentParser, - ICommandSelector commandSelector) + ICommandLineArgumentParser commandLineArgumentParser, + ICommandSelector commandSelector, + IHybridServiceScopeFactory serviceScopeFactory) { CommandLineArgumentParser = commandLineArgumentParser; CommandSelector = commandSelector; + ServiceScopeFactory = serviceScopeFactory; } public async Task RunAsync(string[] args) { var commandLineArgs = CommandLineArgumentParser.Parse(args); - var command = CommandSelector.Select(commandLineArgs); - await command.ExecuteAsync(); - Console.WriteLine(commandLineArgs); + var commandType = CommandSelector.Select(commandLineArgs); + + using (var scope = ServiceScopeFactory.CreateScope()) + { + var command = (IConsoleCommand)scope.ServiceProvider.GetRequiredService(commandType); + await command.ExecuteAsync(commandLineArgs); + } } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs index c5d410f400..32268540a7 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs @@ -1,20 +1,22 @@ -using Volo.Abp.DependencyInjection; +using System; +using Volo.Abp.Cli.Args; +using Volo.Abp.DependencyInjection; -namespace Volo.Abp.Cli +namespace Volo.Abp.Cli.Commands { public class CommandSelector : ICommandSelector, ITransientDependency { - public IConsoleCommand Select(CommandLineArgs commandLineArgs) + public Type Select(CommandLineArgs commandLineArgs) { //TODO: Create options to define commands //TODO: Get from dependency injection instead of new? if (commandLineArgs.Command == "new") { - return new NewProjectCommand(commandLineArgs); + return typeof(NewProjectCommand); } - return new MainHelpCommand(commandLineArgs); + return typeof(MainHelpCommand); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs index 86d2f1d2f0..507f8ab452 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs @@ -1,7 +1,10 @@ -namespace Volo.Abp.Cli +using System; +using Volo.Abp.Cli.Args; + +namespace Volo.Abp.Cli.Commands { public interface ICommandSelector { - IConsoleCommand Select(CommandLineArgs commandLineArgs); + Type Select(CommandLineArgs commandLineArgs); } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs index a3e822a160..2b1129aab2 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs @@ -1,9 +1,10 @@ using System.Threading.Tasks; +using Volo.Abp.Cli.Args; -namespace Volo.Abp.Cli +namespace Volo.Abp.Cli.Commands { public interface IConsoleCommand { - Task ExecuteAsync(); + Task ExecuteAsync(CommandLineArgs commandLineArgs); } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs index 5bb1894229..d06dcade91 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs @@ -1,16 +1,13 @@ using System; using System.Threading.Tasks; +using Volo.Abp.Cli.Args; +using Volo.Abp.DependencyInjection; -namespace Volo.Abp.Cli +namespace Volo.Abp.Cli.Commands { - public class MainHelpCommand : IConsoleCommand + public class MainHelpCommand : ITransientDependency { - public MainHelpCommand(CommandLineArgs commandLineArgs) - { - - } - - public Task ExecuteAsync() + public Task ExecuteAsync(CommandLineArgs commandLineArgs) { Console.WriteLine("*********** ABP CLI ****************"); Console.WriteLine(); diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs index 5ef068e5ae..92ce6fc6f7 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -1,21 +1,41 @@ using System; using System.Threading.Tasks; +using Volo.Abp.Cli.Args; +using Volo.Abp.DependencyInjection; +using Volo.Abp.SolutionTemplating; +using Volo.Abp.SolutionTemplating.Building; -namespace Volo.Abp.Cli +namespace Volo.Abp.Cli.Commands { - public class NewProjectCommand : IConsoleCommand + public class NewProjectCommand : IConsoleCommand, ITransientDependency { - protected CommandLineArgs CommandLineArgs { get; } + protected SolutionBuilder SolutionBuilder { get; } - public NewProjectCommand(CommandLineArgs commandLineArgs) + public NewProjectCommand(SolutionBuilder solutionBuilder) { - CommandLineArgs = commandLineArgs; + SolutionBuilder = solutionBuilder; } - public Task ExecuteAsync() + public async Task ExecuteAsync(CommandLineArgs commandLineArgs) { + if (commandLineArgs.Target == null) + { + Console.WriteLine("Project name is missing."); + Console.WriteLine("Usage:"); + Console.WriteLine(" abp new "); + Console.WriteLine("Example:"); + Console.WriteLine(" abp new Acme.BookStore"); + } + Console.WriteLine("TODO: Create new project"); - return Task.CompletedTask; + + //await SolutionBuilder.BuildAsync( + // null, + // commandLineArgs.Target, + // DatabaseProvider.EntityFrameworkCore, + // "...", + // true + //); } } } \ No newline at end of file From 8eff57d67ddee7ebe1979b42634ab2c63c4c6842 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 19 Apr 2019 16:29:17 +0300 Subject: [PATCH 003/335] Resolves #958 --- .../SettingManagementMainMenuContributor.cs | 31 +++++++++++++++---- .../ISettingPageContributor.cs | 2 ++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs index 79ed300398..9e7427a221 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.DependencyInjection; +using System; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; using System.Linq; @@ -11,17 +12,22 @@ namespace Volo.Abp.SettingManagement.Web.Navigation { public class SettingManagementMainMenuContributor : IMenuContributor { - public Task ConfigureMenuAsync(MenuConfigurationContext context) + public async Task ConfigureMenuAsync(MenuConfigurationContext context) { if (context.Menu.Name != StandardMenus.Main) { - return Task.CompletedTask; + return; } + var settingManagementPageOptions = context.ServiceProvider.GetRequiredService>().Value; - if (!settingManagementPageOptions.Contributors.Any()) + var settingPageCreationContext = new SettingPageCreationContext(context.ServiceProvider); + if ( + !settingManagementPageOptions.Contributors.Any() + || !(await CheckAnyOfPagePermissionsGranted(settingManagementPageOptions, settingPageCreationContext)) + ) { - return Task.CompletedTask; + return; } var l = context.ServiceProvider.GetRequiredService>(); @@ -36,8 +42,21 @@ namespace Volo.Abp.SettingManagement.Web.Navigation icon: "fa fa-cog" ) ); + + } - return Task.CompletedTask; + private async Task CheckAnyOfPagePermissionsGranted( + SettingManagementPageOptions settingManagementPageOptions, + SettingPageCreationContext settingPageCreationContext) + { + foreach (var contributor in settingManagementPageOptions.Contributors) + { + if (await contributor.CheckPermissionsAsync(settingPageCreationContext)) + { + return true; + } + } + return false; } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/ISettingPageContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/ISettingPageContributor.cs index e641ee2ade..f6260cc816 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/ISettingPageContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/ISettingPageContributor.cs @@ -5,5 +5,7 @@ namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement public interface ISettingPageContributor { Task ConfigureAsync(SettingPageCreationContext context); + + Task CheckPermissionsAsync(SettingPageCreationContext context); } } \ No newline at end of file From 6acca095f92c63db228bb30bcb8a93710abd57e0 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 19 Apr 2019 16:30:38 +0300 Subject: [PATCH 004/335] Update SettingManagementMainMenuContributor.cs --- .../Navigation/SettingManagementMainMenuContributor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs index 9e7427a221..4bbb0f0bfd 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs @@ -23,8 +23,8 @@ namespace Volo.Abp.SettingManagement.Web.Navigation var settingManagementPageOptions = context.ServiceProvider.GetRequiredService>().Value; var settingPageCreationContext = new SettingPageCreationContext(context.ServiceProvider); if ( - !settingManagementPageOptions.Contributors.Any() - || !(await CheckAnyOfPagePermissionsGranted(settingManagementPageOptions, settingPageCreationContext)) + !settingManagementPageOptions.Contributors.Any() || + !(await CheckAnyOfPagePermissionsGranted(settingManagementPageOptions, settingPageCreationContext)) ) { return; From 859a001a037ef60df9c1237ae89087adbd3590a0 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 19 Apr 2019 16:30:59 +0300 Subject: [PATCH 005/335] Update NewProjectCommand.cs --- .../Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs index 92ce6fc6f7..b3051ea700 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -20,14 +20,16 @@ namespace Volo.Abp.Cli.Commands { if (commandLineArgs.Target == null) { - Console.WriteLine("Project name is missing."); + Console.WriteLine("Solution name is missing."); Console.WriteLine("Usage:"); Console.WriteLine(" abp new "); Console.WriteLine("Example:"); Console.WriteLine(" abp new Acme.BookStore"); + return; } - Console.WriteLine("TODO: Create new project"); + Console.WriteLine("Creating a new solution"); + Console.WriteLine("Solution name: " + commandLineArgs.Target); //await SolutionBuilder.BuildAsync( // null, From d94b8625ddae53a461b6d3024a4dd3c20faf2be7 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 22 Apr 2019 09:00:26 +0300 Subject: [PATCH 006/335] Resolves #1028 --- .../Services/AsyncCrudAppService.cs | 22 +++++++++---------- .../Application/Services/CrudAppService.cs | 22 +++++++++---------- .../Services/CrudAppServiceBase.cs | 10 ++++----- .../Application/Services/ICrudAppService.cs | 2 +- .../Application/PersonAppService_Tests.cs | 2 +- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs index 36c4780672..6e3b476b5c 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs @@ -20,8 +20,8 @@ namespace Volo.Abp.Application.Services } } - public abstract class AsyncCrudAppService - : AsyncCrudAppService + public abstract class AsyncCrudAppService + : AsyncCrudAppService where TEntity : class, IEntity where TEntityDto : IEntityDto { @@ -32,8 +32,8 @@ namespace Volo.Abp.Application.Services } } - public abstract class AsyncCrudAppService - : AsyncCrudAppService + public abstract class AsyncCrudAppService + : AsyncCrudAppService where TEntity : class, IEntity where TEntityDto : IEntityDto { @@ -44,9 +44,9 @@ namespace Volo.Abp.Application.Services } } - public abstract class AsyncCrudAppService - : CrudAppServiceBase, - IAsyncCrudAppService + public abstract class AsyncCrudAppService + : CrudAppServiceBase, + IAsyncCrudAppService where TEntity : class, IEntity where TEntityDto : IEntityDto { @@ -66,9 +66,9 @@ namespace Volo.Abp.Application.Services return MapToEntityDto(entity); } - public virtual async Task> GetListAsync(TGetAllInput input) + public virtual async Task> GetListAsync(TGetListInput input) { - await CheckGetAllPolicyAsync(); + await CheckGetListPolicyAsync(); var query = CreateFilteredQuery(input); @@ -128,9 +128,9 @@ namespace Volo.Abp.Application.Services await CheckPolicyAsync(GetPolicyName); } - protected virtual async Task CheckGetAllPolicyAsync() + protected virtual async Task CheckGetListPolicyAsync() { - await CheckPolicyAsync(GetAllPolicyName); + await CheckPolicyAsync(GetListPolicyName); } protected virtual async Task CheckCreatePolicyAsync() diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs index 8127e88f23..1fd6f869ff 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs @@ -17,8 +17,8 @@ namespace Volo.Abp.Application.Services } } - public abstract class CrudAppService - : CrudAppService + public abstract class CrudAppService + : CrudAppService where TEntity : class, IEntity where TEntityDto : IEntityDto { @@ -29,8 +29,8 @@ namespace Volo.Abp.Application.Services } } - public abstract class CrudAppService - : CrudAppService + public abstract class CrudAppService + : CrudAppService where TEntity : class, IEntity where TEntityDto : IEntityDto where TCreateInput : IEntityDto @@ -42,9 +42,9 @@ namespace Volo.Abp.Application.Services } } - public abstract class CrudAppService - : CrudAppServiceBase, - ICrudAppService + public abstract class CrudAppService + : CrudAppServiceBase, + ICrudAppService where TEntity : class, IEntity where TEntityDto : IEntityDto { @@ -62,9 +62,9 @@ namespace Volo.Abp.Application.Services return MapToEntityDto(entity); } - public virtual PagedResultDto GetAll(TGetAllInput input) + public virtual PagedResultDto GetList(TGetListInput input) { - CheckGetAllPolicy(); + CheckGetListPolicy(); var query = CreateFilteredQuery(input); @@ -122,9 +122,9 @@ namespace Volo.Abp.Application.Services CheckPolicy(GetPolicyName); } - protected virtual void CheckGetAllPolicy() + protected virtual void CheckGetListPolicy() { - CheckPolicy(GetAllPolicyName); + CheckPolicy(GetListPolicyName); } protected virtual void CheckCreatePolicy() diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppServiceBase.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppServiceBase.cs index eb4c7a200f..4d878ad6c3 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppServiceBase.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppServiceBase.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.Application.Services /// This is a common base class for CrudAppService and AsyncCrudAppService classes. /// Inherit either from CrudAppService or AsyncCrudAppService, not from this class. /// - public abstract class CrudAppServiceBase : + public abstract class CrudAppServiceBase : ApplicationService where TEntity : class, IEntity where TEntityDto : IEntityDto @@ -21,7 +21,7 @@ namespace Volo.Abp.Application.Services protected virtual string GetPolicyName { get; set; } - protected virtual string GetAllPolicyName { get; set; } + protected virtual string GetListPolicyName { get; set; } protected virtual string CreatePolicyName { get; set; } @@ -39,7 +39,7 @@ namespace Volo.Abp.Application.Services /// /// The query. /// The input. - protected virtual IQueryable ApplySorting(IQueryable query, TGetAllInput input) + protected virtual IQueryable ApplySorting(IQueryable query, TGetListInput input) { //Try to sort query if available var sortInput = input as ISortedResultRequest; @@ -66,7 +66,7 @@ namespace Volo.Abp.Application.Services /// /// The query. /// The input. - protected virtual IQueryable ApplyPaging(IQueryable query, TGetAllInput input) + protected virtual IQueryable ApplyPaging(IQueryable query, TGetListInput input) { //Try to use paging if available var pagedInput = input as IPagedResultRequest; @@ -93,7 +93,7 @@ namespace Volo.Abp.Application.Services /// methods. /// /// The input. - protected virtual IQueryable CreateFilteredQuery(TGetAllInput input) + protected virtual IQueryable CreateFilteredQuery(TGetListInput input) { return Repository; } diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ICrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ICrudAppService.cs index 9f06c63aea..7e8b96b9f8 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ICrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ICrudAppService.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.Application.Services { TEntityDto Get(TKey id); - PagedResultDto GetAll(TGetListInput input); + PagedResultDto GetList(TGetListInput input); TEntityDto Create(TCreateInput input); diff --git a/framework/test/Volo.Abp.TestApp.Tests/Volo/Abp/TestApp/Application/PersonAppService_Tests.cs b/framework/test/Volo.Abp.TestApp.Tests/Volo/Abp/TestApp/Application/PersonAppService_Tests.cs index 9dbfc8936e..c58b1b5f85 100644 --- a/framework/test/Volo.Abp.TestApp.Tests/Volo/Abp/TestApp/Application/PersonAppService_Tests.cs +++ b/framework/test/Volo.Abp.TestApp.Tests/Volo/Abp/TestApp/Application/PersonAppService_Tests.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.TestApp.Application } [Fact] - public async Task GetAll() + public async Task GetList() { var people = await _peopleAppService.GetListAsync(new PagedAndSortedResultRequestDto()); people.Items.Count.ShouldBeGreaterThan(0); From 370aac6feb1bceb15c32808375835a09ea322b99 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 22 Apr 2019 15:01:24 +0800 Subject: [PATCH 007/335] Microsoft.AspNetCore.App package does not specify version. --- .../app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj | 2 +- .../applications/AuthServer.Host/AuthServer.Host.csproj | 2 +- .../BackendAdminAppGateway.Host.csproj | 2 +- .../gateways/InternalGateway.Host/InternalGateway.Host.csproj | 2 +- .../PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj | 2 +- .../BloggingService.Host/BloggingService.Host.csproj | 2 +- .../IdentityService.Host/IdentityService.Host.csproj | 2 +- .../ProductService.Host/ProductService.Host.csproj | 2 +- .../MyCompanyName.MyProjectName.DemoApp.csproj | 2 +- .../MyCompanyName.MyProjectName.Web.csproj | 2 +- .../MyCompanyName.MyProjectName.Host.csproj | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj index 040cfaf4a8..7b88e297f4 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj @@ -16,7 +16,7 @@ - + diff --git a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj index 0b938960f5..3fb01d55d7 100644 --- a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj +++ b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj index 28bb533c46..3ae6528058 100644 --- a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj index dafa931f24..7aa8f1eab1 100644 --- a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj index c04e6bdfaa..ecc2bcdfe5 100644 --- a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj index 88671a50f4..972fbd9d31 100644 --- a/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj +++ b/samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj b/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj index 810c69a198..bc11e9759f 100644 --- a/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj +++ b/samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj b/samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj index ce42a3f22e..4cfac32df9 100644 --- a/samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj +++ b/samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj @@ -12,7 +12,7 @@ - + diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj b/templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj index 4e019c6d9b..c4456e9e69 100644 --- a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj +++ b/templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj @@ -5,7 +5,7 @@ - + diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/mvc/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj index 4f44771362..fcbcc3104c 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj +++ b/templates/mvc/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj @@ -21,7 +21,7 @@ - + diff --git a/templates/service/host/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj b/templates/service/host/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj index f8b368d460..4e946bfb35 100644 --- a/templates/service/host/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj +++ b/templates/service/host/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj @@ -5,7 +5,7 @@ - + From 1e5506866880ee8047a0141f65ffff4d777423bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Tue, 23 Apr 2019 10:10:55 +0800 Subject: [PATCH 008/335] Add Chinese localization texts --- .../Localization/Resources/FeatureManagement/zh-Hans.json | 2 +- .../Resources/AbpPermissionManagement/zh-Hans.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json index 25137f1ee3..765449637e 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json @@ -1,6 +1,6 @@ { "culture": "zh-Hans", "texts": { - + "Features": "特性" } } \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json index 8384078b86..195d3254b6 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json @@ -3,6 +3,8 @@ "texts": { "Permissions": "权限", "OnlyProviderPermissons": "只有这个提供商", - "All": "所有" + "All": "所有", + "SelectAllInAllTabs": "授予所有权限", + "SelectAllInThisTab": "全选" } } \ No newline at end of file From b85946581d3bdc88bde21198a75a77e18d95e55a Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 23 Apr 2019 10:26:42 +0800 Subject: [PATCH 009/335] Update zh-Hans.json --- .../AbpPermissionManagement/zh-Hans.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json index 195d3254b6..11c52c43ed 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json @@ -1,10 +1,10 @@ { - "culture": "zh-Hans", - "texts": { - "Permissions": "权限", - "OnlyProviderPermissons": "只有这个提供商", - "All": "所有", - "SelectAllInAllTabs": "授予所有权限", - "SelectAllInThisTab": "全选" - } - } \ No newline at end of file + "culture": "zh-Hans", + "texts": { + "Permissions": "权限", + "OnlyProviderPermissons": "只有这个提供商", + "All": "所有", + "SelectAllInAllTabs": "授予所有权限", + "SelectAllInThisTab": "全选" + } +} From 74d0b9e1c663a6df40e4c7f46eb4bd117765f771 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 23 Apr 2019 10:27:04 +0800 Subject: [PATCH 010/335] Update zh-Hans.json --- .../Resources/FeatureManagement/zh-Hans.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json index 765449637e..e9e1aab620 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json @@ -1,6 +1,6 @@ { - "culture": "zh-Hans", - "texts": { - "Features": "特性" - } -} \ No newline at end of file + "culture": "zh-Hans", + "texts": { + "Features": "特性" + } +} From 571dd8f576cfca4e5ed4a096c2a0f2560699abc7 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 23 Apr 2019 15:54:50 +0800 Subject: [PATCH 011/335] fix #1036 Modify the maximum length of DefaultConnectionString. --- .../TenantManagement/Tenants/ConnectionStringsModal.cshtml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/ConnectionStringsModal.cshtml.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/ConnectionStringsModal.cshtml.cs index a2beeda27d..a4db743263 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/ConnectionStringsModal.cshtml.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/ConnectionStringsModal.cshtml.cs @@ -52,7 +52,7 @@ namespace Volo.Abp.TenantManagement.Web.Pages.TenantManagement.Tenants public bool UseSharedDatabase { get; set; } - [StringLength(TenantConnectionStringConsts.MaxNameLength)] + [StringLength(TenantConnectionStringConsts.MaxValueLength)] public string DefaultConnectionString { get; set; } } } From dc036343dc71762779d5bf1e42559b1c7817800f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Tue, 23 Apr 2019 17:11:33 +0800 Subject: [PATCH 012/335] Add Chinese localization resources --- .../Localization/Resources/VoloDocs/Web/zh-Hans.json | 9 +++++++++ modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj | 3 +-- .../Localization/Resources/Docs/Web/en.json | 3 ++- .../Localization/Resources/Docs/Web/zh-Hans.json | 7 ++++--- .../Localization/ApplicationContracts/zh-Hans.json | 1 + 5 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/zh-Hans.json diff --git a/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/zh-Hans.json b/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/zh-Hans.json new file mode 100644 index 0000000000..c0a5d398ae --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/zh-Hans.json @@ -0,0 +1,9 @@ +{ + "culture": "zh-Hans", + "texts": { + "WelcomeVoloDocs": "欢迎使用VoloDocs!", + "NoProjectWarning": "当前没有定义的项目!", + "CreateYourFirstProject": "点击这里开始你的第一个项目", + "NoProject": "没有项目!" + } +} \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj index 7870968c45..75f91ed0ad 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj +++ b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj @@ -9,8 +9,7 @@ - - + diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/en.json b/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/en.json index 8f8fdc0191..73747c3cf7 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/en.json +++ b/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/en.json @@ -21,6 +21,7 @@ "DisplayName:MainWebsiteUrl": "Main web site URL", "DisplayName:LatestVersionBranchName": "Latest version branch name", "DisplayName:GitHubRootUrl": "GitHub root URL", - "DisplayName:GitHubAccessToken": "GitHub access token" + "DisplayName:GitHubAccessToken": "GitHub access token", + "DisplayName:GitHubUserAgent": "GitHub user agent" } } \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/zh-Hans.json b/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/zh-Hans.json index 36bc285090..2b2911fad9 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/zh-Hans.json +++ b/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/zh-Hans.json @@ -21,6 +21,7 @@ "DisplayName:MainWebsiteUrl": "主网站网址", "DisplayName:LatestVersionBranchName": "最新版本的分支名称", "DisplayName:GitHubRootUrl": "GitHub根网址", - "DisplayName:GitHubAccessToken": "GitHub访问令牌" - } - } \ No newline at end of file + "DisplayName:GitHubAccessToken": "GitHub访问令牌", + "DisplayName:GitHubUserAgent": "GitHub用户代理" + } +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/zh-Hans.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/zh-Hans.json index e670d9f206..ca1c428755 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/zh-Hans.json +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/zh-Hans.json @@ -5,6 +5,7 @@ "Permission:Create": "创建", "Permission:Edit": "编辑", "Permission:Delete": "删除", + "Permission:ManageConnectionStrings": "管理连接字符串", "Permission:ManageFeatures": "管理功能" } } \ No newline at end of file From 31ec9921aa94a35b24dc74540d70e05c010dfc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Tue, 23 Apr 2019 17:26:30 +0800 Subject: [PATCH 013/335] Fix bugs and add localization languages for docs module --- .../VoloDocsDbContextFactory.cs | 2 +- modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocsDbContextFactory.cs b/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocsDbContextFactory.cs index 4daa15555b..927405f2a4 100644 --- a/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocsDbContextFactory.cs +++ b/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocsDbContextFactory.cs @@ -20,7 +20,7 @@ namespace VoloDocs.EntityFrameworkCore private static IConfigurationRoot BuildConfiguration() { var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../VoloDocs/")) + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../VoloDocs.Web/")) .AddJsonFile("appsettings.json", optional: false); return builder.Build(); diff --git a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs index 9520a0e9df..cc018ddcc1 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs +++ b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs @@ -29,7 +29,7 @@ using Volo.Docs; using Volo.Docs.Admin; using Volo.Docs.Localization; using VoloDocs.EntityFrameworkCore; -using VoloDocs.Web.Utils; +using Localization.Resources.AbpUi; namespace VoloDocs.Web { @@ -107,14 +107,15 @@ namespace VoloDocs.Web Configure(options => { - options - .Languages - .Add(new LanguageInfo("en", "en", "English")); + + options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); options.Resources .Get() .AddBaseTypes(typeof(AbpValidationResource)) - .AddBaseTypes(typeof(AbpUiModule)) + .AddBaseTypes(typeof(AbpUiResource)) .AddVirtualJson("/Localization/Resources/VoloDocs/Web"); }); From ac99f470e154b45f6ee240780099d3cc023bed43 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 23 Apr 2019 18:42:50 +0800 Subject: [PATCH 014/335] Fix AddBaseTypes method parameter name spelling mistakes. --- modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs | 5 +++-- modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs index ac7cc9e210..9071dee2d6 100644 --- a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc.RazorPages; +using Localization.Resources.AbpUi; +using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; @@ -47,7 +48,7 @@ namespace Volo.Blogging options.Resources .Get() .AddBaseTypes(typeof(AbpValidationResource)) - .AddBaseTypes(typeof(AbpUiModule)) + .AddBaseTypes(typeof(AbpUiResource)) .AddVirtualJson("/Localization/Resources/Blogging/Web"); }); diff --git a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs index dc917328b0..f23cae0436 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs +++ b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs @@ -1,4 +1,5 @@ -using Volo.Abp.AspNetCore.Mvc.Localization; +using Localization.Resources.AbpUi; +using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AutoMapper; using Volo.Abp.Localization; @@ -44,7 +45,7 @@ namespace Volo.Docs.Admin options.Resources .Get() .AddBaseTypes(typeof(AbpValidationResource)) - .AddBaseTypes(typeof(AbpUiModule)) + .AddBaseTypes(typeof(AbpUiResource)) .AddVirtualJson("/Localization/Resources/Docs/Web"); }); From 69abc246e60909a41cc885cf3a371042dc98515f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Wed, 24 Apr 2019 15:03:40 +0800 Subject: [PATCH 015/335] Ensure GitHub root url ends with forward slash in docs module If user forgot to put a forward slash at the end of github repo's root url (it's common for urls copied from the web browser's address bar), the code "rawRootUrl + documentName" will return an invalid url path. --- .../Volo/Docs/GitHub/Documents/GithubDocumentStore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs index 715306ae5c..b6bd194329 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs @@ -206,7 +206,7 @@ namespace Volo.Docs.GitHub.Documents { return rootUrl .Replace("github.com", "raw.githubusercontent.com") - .ReplaceFirst("/tree/", "/"); + .ReplaceFirst("/tree/", "/").EnsureEndsWith('/'); } } } \ No newline at end of file From 2b0f7f2e5341ff99d819c632fa38d22ee0672bab Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 24 Apr 2019 15:16:36 +0800 Subject: [PATCH 016/335] Update GithubDocumentStore.cs --- .../Volo/Docs/GitHub/Documents/GithubDocumentStore.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs index b6bd194329..2d65a17c68 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/GitHub/Documents/GithubDocumentStore.cs @@ -206,7 +206,8 @@ namespace Volo.Docs.GitHub.Documents { return rootUrl .Replace("github.com", "raw.githubusercontent.com") - .ReplaceFirst("/tree/", "/").EnsureEndsWith('/'); + .ReplaceFirst("/tree/", "/") + .EnsureEndsWith('/'); } } -} \ No newline at end of file +} From b82ed5a7fa7628e3b7257485a8d56f0b00ca3e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Wed, 24 Apr 2019 15:36:03 +0800 Subject: [PATCH 017/335] Fix incorrect project links on the home page in docs module --- modules/docs/app/VoloDocs.Web/Pages/Index.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml b/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml index 6f6c083531..6b3c198eae 100644 --- a/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml +++ b/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml @@ -41,8 +41,8 @@ {
  • - @project.Name From 1385b0a6dd48ccb95d5f5d2c89d2bfe2be4d6c9e Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 24 Apr 2019 16:15:48 +0800 Subject: [PATCH 018/335] Update Index.cshtml --- modules/docs/app/VoloDocs.Web/Pages/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml b/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml index 6b3c198eae..4ac9f376ad 100644 --- a/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml +++ b/modules/docs/app/VoloDocs.Web/Pages/Index.cshtml @@ -42,7 +42,7 @@
  • @project.Name From f47884485acca9520f2ed8b96d3b85506de9a9a0 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 24 Apr 2019 20:33:04 +0300 Subject: [PATCH 019/335] Render content_toolbar --- .../Themes/Basic/Layouts/Application.cshtml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml index 4864f2dafe..0ad0c76591 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml @@ -29,6 +29,10 @@ @(await Component.InvokeAsync()) +
    + @RenderSection("content_toolbar", false) +
    +
    @(await Component.InvokeAsync()) @RenderBody() From 034ab0b81ce10fae6ac3297f3c3d28a94679fddf Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 24 Apr 2019 20:36:22 +0300 Subject: [PATCH 020/335] Move content_toolbar into the container. --- .../Themes/Basic/Layouts/Application.cshtml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml index 0ad0c76591..5e3b66ffa7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml @@ -28,13 +28,12 @@ @(await Component.InvokeAsync()) - -
    - @RenderSection("content_toolbar", false) -
    - +
    @(await Component.InvokeAsync()) +
    + @RenderSection("content_toolbar", false) +
    @RenderBody()
    From 4bc6c8619b138afa8ed22e730b1f1cdde9ff0085 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 24 Apr 2019 20:38:43 +0300 Subject: [PATCH 021/335] Add margin --- .../Themes/Basic/Layouts/Application.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml index 5e3b66ffa7..1cd530d021 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml @@ -31,7 +31,7 @@
    @(await Component.InvokeAsync()) -
    +
    @RenderSection("content_toolbar", false)
    @RenderBody() From bbb7046925ee2c3979247d10eb4485d730248275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Thu, 25 Apr 2019 11:01:09 +0800 Subject: [PATCH 022/335] UrlEncode post url within Redirect method in blogging module Error "InvalidOperationException: Invalid non-ASCII or control character in header" when url contains none ASCII characters, see AspNetCore issue [4919](https://github.com/aspnet/AspNetCore/issues/4919) --- .../src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs index 468d46decd..976f78b7d1 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs @@ -54,7 +54,7 @@ namespace Volo.Blogging.Pages.Blog.Posts var postWithDetailsDto = await _postAppService.CreateAsync(ObjectMapper.Map(Post)); //TODO: Try Url.Page(...) - return Redirect(Url.Content($"~/blog/{blog.ShortName}/{postWithDetailsDto.Url}")); + return Redirect(Url.Content($"~/blog/{blog.ShortName}/{WebUtility.UrlEncode(postWithDetailsDto.Url)}")); } public class CreatePostViewModel From 1e2c0d1ee132a483e32855904d6c620f8bfd2158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Thu, 25 Apr 2019 11:19:19 +0800 Subject: [PATCH 023/335] UrlEncode blog short name within Redirect method --- .../src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs index 976f78b7d1..fe0a809d07 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs @@ -54,7 +54,7 @@ namespace Volo.Blogging.Pages.Blog.Posts var postWithDetailsDto = await _postAppService.CreateAsync(ObjectMapper.Map(Post)); //TODO: Try Url.Page(...) - return Redirect(Url.Content($"~/blog/{blog.ShortName}/{WebUtility.UrlEncode(postWithDetailsDto.Url)}")); + return Redirect(Url.Content($"~/blog/{WebUtility.UrlEncode(blog.ShortName)}/{WebUtility.UrlEncode(postWithDetailsDto.Url)}")); } public class CreatePostViewModel From ab413f44cddfdb8cd909e8dc70c65e8b899f39db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Thu, 25 Apr 2019 11:47:54 +0800 Subject: [PATCH 024/335] UrlEncode parameters within Redirect method in post edit page model --- .../src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs index b35d07993d..2ccf8cff8f 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.Linq; +using System.Net; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -61,7 +62,7 @@ namespace Volo.Blogging.Pages.Blog.Posts var editedPost = await _postAppService.UpdateAsync(Post.Id, post); var blog = await _blogAppService.GetAsync(editedPost.BlogId); - return Redirect(Url.Content($"~/blog/{blog.ShortName}/{editedPost.Url}")); + return Redirect(Url.Content($"~/blog/{WebUtility.UrlEncode(blog.ShortName)}/{WebUtility.UrlEncode(editedPost.Url)}")); } } From 41bfc39228b35c1da9474793b2be944b6451b498 Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 25 Apr 2019 16:20:25 +0800 Subject: [PATCH 025/335] fix #1049 Make sure the directory exists before writing to the file. --- .../Volo/Blogging/Files/FileAppService.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs index d8b9273f0c..b188fe4c3e 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs @@ -23,6 +23,17 @@ namespace Volo.Blogging.Files { Check.NotNullOrWhiteSpace(name, nameof(name)); + if (!Directory.Exists(Options.FileUploadLocalFolder)) + { + Directory.CreateDirectory(Options.FileUploadLocalFolder); + return Task.FromResult( + new RawFileDto + { + Bytes = new byte[0] + } + ); + } + var filePath = Path.Combine(Options.FileUploadLocalFolder, name); return Task.FromResult( @@ -53,6 +64,11 @@ namespace Volo.Blogging.Files var uniqueFileName = GenerateUniqueFileName(Path.GetExtension(input.Name)); var filePath = Path.Combine(Options.FileUploadLocalFolder, uniqueFileName); + if (!Directory.Exists(Options.FileUploadLocalFolder)) + { + Directory.CreateDirectory(Options.FileUploadLocalFolder); + } + File.WriteAllBytes(filePath, input.Bytes); //TODO: Previously was using WriteAllBytesAsync, but it's only in .netcore. return Task.FromResult(new FileUploadOutputDto From 63653df2846b68e8068356fb1996b7bdc8a65ae0 Mon Sep 17 00:00:00 2001 From: CdLian <970433771@qq.com> Date: Thu, 25 Apr 2019 17:24:08 +0800 Subject: [PATCH 026/335] Update Entities.md --- docs/zh-Hans/Best-Practices/Entities.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh-Hans/Best-Practices/Entities.md b/docs/zh-Hans/Best-Practices/Entities.md index 637ecaef6d..fd709ef35f 100644 --- a/docs/zh-Hans/Best-Practices/Entities.md +++ b/docs/zh-Hans/Best-Practices/Entities.md @@ -64,7 +64,7 @@ public class Issue : FullAuditedAggregateRoot //使用Guid作为键/标识 protected Issue() { /* 此构造函数是提供给ORM用来从数据库中获取实体. - * - 无需初始化Lanels集合 + * - 无需初始化Labels集合 因为它会被来自数据库的值覆盖. - It's protected since proxying and deserialization tools 可能不适用于私有构造函数. @@ -150,4 +150,4 @@ public class IssueLabel : Entity ### 参考文献 * Effective Aggregate Design by Vaughn Vernon - http://dddcommunity.org/library/vernon_2011 \ No newline at end of file + http://dddcommunity.org/library/vernon_2011 From eab649325281b1688790128012e64631ed30430a Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 25 Apr 2019 21:01:33 +0800 Subject: [PATCH 027/335] fix #1051 new/edit post jquery validate problem. --- .../Volo.Blogging.Web/Pages/Blog/BloggingPage.cs | 5 +++++ .../src/Volo.Blogging.Web/Pages/Blog/Posts/edit.js | 14 ++++++++++++-- .../src/Volo.Blogging.Web/Pages/Blog/Posts/new.js | 14 +++++++++++--- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs index 03214d1ee3..88133e0e84 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/BloggingPage.cs @@ -55,6 +55,11 @@ namespace Volo.Blogging.Pages.Blog public IHtmlContent RenderMarkdownToHtml(string content) { + if(content.IsNullOrWhiteSpace()) + { + return new HtmlString(""); + } + byte[] bytes = Encoding.Default.GetBytes(content); var utf8Content = Encoding.UTF8.GetString(bytes); diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/edit.js b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/edit.js index 9fb4929d30..6b0dd9f02b 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/edit.js +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/edit.js @@ -1,4 +1,4 @@ -(function ($) { +$(function () { var $container = $("#edit-post-container"); var $editorContainer = $container.find(".edit-post-editor"); @@ -72,6 +72,8 @@ load: function () { $editorContainer.find(".loading-cover").remove(); $submitButton.prop("disabled", false); + $form.data("validator").settings.ignore = '.ignore'; + $editorContainer.find(':input').addClass('ignore'); } } }).data(editorDataKey); @@ -82,8 +84,16 @@ var postText = newPostEditor.getMarkdown(); $postTextInput.val(postText); + if (!$form.valid()) { + var validationResult = $form.validate(); + abp.message.warn(validationResult.errorList[0].message); //TODO: errors can be merged into lines. make sweetalert accept HTML. + e.preventDefault(); + return false; //for old browsers + } + $submitButton.buttonBusy(); $(this).off('submit').submit(); }); -})(jQuery); +}); + diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/new.js b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/new.js index 519d3f41f4..0c3e927264 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/new.js +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/new.js @@ -1,5 +1,4 @@ -var editor = null; -(function ($) { +$(function () { var $container = $("#qa-new-post-container"); var $editorContainer = $container.find(".new-post-editor"); @@ -72,6 +71,8 @@ load: function () { $editorContainer.find(".loading-cover").remove(); $submitButton.prop("disabled", false); + $form.data("validator").settings.ignore = '.ignore'; + $editorContainer.find(':input').addClass('ignore'); } } }).data(editorDataKey); @@ -82,6 +83,13 @@ var postText = newPostEditor.getMarkdown(); $postTextInput.val(postText); + if (!$form.valid()) { + var validationResult = $form.validate(); + abp.message.warn(validationResult.errorList[0].message); //TODO: errors can be merged into lines. make sweetalert accept HTML. + e.preventDefault(); + return false; //for old browsers + } + $submitButton.buttonBusy(); $(this).off('submit').submit(); }); @@ -113,4 +121,4 @@ } }); -})(jQuery); +}); From 5ad7d4237376e4353a745d6627ccdbc67e76f94d Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Thu, 25 Apr 2019 17:28:54 +0300 Subject: [PATCH 028/335] Fix dependency --- .../Volo/Abp/Users/AbpUsersDomainModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/AbpUsersDomainModule.cs b/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/AbpUsersDomainModule.cs index d3d6a01185..962c08c018 100644 --- a/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/AbpUsersDomainModule.cs +++ b/modules/users/src/Volo.Abp.Users.Domain/Volo/Abp/Users/AbpUsersDomainModule.cs @@ -1,12 +1,12 @@ -using Volo.Abp.Modularity; -using Volo.Abp.Security; +using Volo.Abp.Domain; +using Volo.Abp.Modularity; namespace Volo.Abp.Users { [DependsOn( typeof(AbpUsersDomainSharedModule), typeof(AbpUsersAbstractionModule), - typeof(AbpSecurityModule) + typeof(AbpDddDomainModule) )] public class AbpUsersDomainModule : AbpModule { From d885d4e73b58d7a82b88cf79c7276423bbcf6044 Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 26 Apr 2019 11:32:19 +0800 Subject: [PATCH 029/335] fix #1053 Show badge for public & default roles in the role list. --- .../Pages/Identity/Roles/index.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js index 476b484128..1f4c0e0316 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js @@ -57,7 +57,17 @@ } }, { - data: "name" + data: "name", + render: function (data, type, row) { + var name = '' + data + ''; + if (row.isDefault) { + name += 'Default'; + } + if (row.isPublic) { + name += 'Public'; + } + return name; + } } ] })); From dbbbe903050c284b24f7aa2405124c521c9f8881 Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 26 Apr 2019 11:38:38 +0800 Subject: [PATCH 030/335] Localized role badge. --- .../src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js index 1f4c0e0316..385b53f257 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js @@ -61,10 +61,10 @@ render: function (data, type, row) { var name = '' + data + ''; if (row.isDefault) { - name += 'Default'; + name += '' + l('DisplayName:IsDefault') + ''; } if (row.isPublic) { - name += 'Public'; + name += '' + l('DisplayName:IsPublic') + ''; } return name; } From cabbb6f72c524f94ddcd028f70306db0af848c34 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 26 Apr 2019 09:08:59 +0300 Subject: [PATCH 031/335] Update README.md --- abp_io/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abp_io/README.md b/abp_io/README.md index 2095b52ef6..813329cbea 100644 --- a/abp_io/README.md +++ b/abp_io/README.md @@ -1,2 +1,2 @@ -## abp.op +## abp.io Source code of the official web site: https://abp.io From 731687036364e1c1a3fb739bfd8d5b4ac3de30dc Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 26 Apr 2019 14:39:24 +0800 Subject: [PATCH 032/335] ReflectionHelper add GetAllConstants method. Get all the constant values in the specified type (including the base type). --- .../Volo/Abp/Reflection/ReflectionHelper.cs | 37 +++++++ .../Abp/Reflection/ReflectionHelper_Tests.cs | 99 ++++++++++++++++++- 2 files changed, 134 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs index 1c4b162b21..27db5ae480 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs @@ -165,5 +165,42 @@ namespace Volo.Abp.Reflection property = currentType.GetProperty(properties.Last()); property.SetValue(obj, value); } + + + /// + /// Get all the constant values in the specified type (including the base type). + /// + /// + /// + public static string[] GetAllConstants(Type type) + { + var constants = new List(); + GetAllConstantsRecursively(constants, type, 1); + return constants.ToArray(); + } + + private static void GetAllConstantsRecursively(List constants, Type type, int currentDepth) + { + const int maxRecursiveParameterValidationDepth = 8; + + if (currentDepth > maxRecursiveParameterValidationDepth) + { + return; + } + + constants.AddRange( + type.GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy) + .Where(x => x.IsLiteral && !x.IsInitOnly) + .Select(x => x.GetValue(null).ToString()) + ); + + var nestedTypes = type.GetNestedTypes(BindingFlags.Public); + + foreach (var nestedType in nestedTypes) + { + GetAllConstantsRecursively(constants, nestedType, currentDepth + 1); + } + } + } } diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/ReflectionHelper_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/ReflectionHelper_Tests.cs index 842940cfaf..cd2ec77b03 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/ReflectionHelper_Tests.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/ReflectionHelper_Tests.cs @@ -1,7 +1,102 @@ -namespace Volo.Abp.Reflection +using System.Linq; +using Shouldly; +using Xunit; + +namespace Volo.Abp.Reflection { public class ReflectionHelper_Tests { //TODO: ... + + + [Fact] + public void GetAllConstants_Test() + { + var constants = ReflectionHelper.GetAllConstants(typeof(BaseRole)); + + constants.ShouldNotBeEmpty(); + constants.Length.ShouldBe(1); + constants.ShouldContain(x => x == "DefaultBaseRoleName"); + } + + [Fact] + public void GetAllConstants_Inherit_Test() + { + var constants = ReflectionHelper.GetAllConstants(typeof(Roles)); + + constants.ShouldNotBeEmpty(); + constants.Length.ShouldBe(2); + constants.ShouldContain(x => x == "DefaultBaseRoleName"); + constants.ShouldContain(x => x == "DefaultRoleName"); + } + + + [Fact] + public void GetAllConstants_NestedTypes_Test() + { + var constants = ReflectionHelper.GetAllConstants(typeof(IdentityPermissions)); + + constants.ShouldNotBeEmpty(); + constants.Except(IdentityPermissions.GetAll()).Count().ShouldBe(0); + } } -} + + + public class BaseRole + { + public const string BaseRoleName = "DefaultBaseRoleName"; + } + + public class Roles : BaseRole + { + public const string RoleName = "DefaultRoleName"; + } + + public static class IdentityPermissions + { + public const string GroupName = "AbpIdentity"; + + public static class Roles + { + public const string Default = GroupName + ".Roles"; + public const string Create = Default + ".Create"; + public const string Update = Default + ".Update"; + public const string Delete = Default + ".Delete"; + public const string ManagePermissions = Default + ".ManagePermissions"; + } + + public static class Users + { + public const string Default = GroupName + ".Users"; + public const string Create = Default + ".Create"; + public const string Update = Default + ".Update"; + public const string Delete = Default + ".Delete"; + public const string ManagePermissions = Default + ".ManagePermissions"; + } + + public static class UserLookup + { + public const string Default = GroupName + ".UserLookup"; + } + + public static string[] GetAll() + { + return new[] + { + GroupName, + Roles.Default, + Roles.Create, + Roles.Update, + Roles.Delete, + Roles.ManagePermissions, + Users.Default, + Users.Create, + Users.Update, + Users.Delete, + Users.ManagePermissions, + UserLookup.Default + }; + } + } + +} \ No newline at end of file From d85857510459365310c3e5b869a407e1c7e8f1ac Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 26 Apr 2019 10:17:07 +0300 Subject: [PATCH 033/335] docs admin moved to administration menu --- .../Volo.Docs.Admin.Web/Navigation/DocsMenuContributor.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Navigation/DocsMenuContributor.cs b/modules/docs/src/Volo.Docs.Admin.Web/Navigation/DocsMenuContributor.cs index aff5fb1254..4097470c60 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Navigation/DocsMenuContributor.cs +++ b/modules/docs/src/Volo.Docs.Admin.Web/Navigation/DocsMenuContributor.cs @@ -19,12 +19,15 @@ namespace Volo.Docs.Admin.Navigation private async Task ConfigureMainMenu(MenuConfigurationContext context) { + + var administrationMenu = context.Menu.GetAdministration(); + var authorizationService = context.ServiceProvider.GetRequiredService(); var l = context.ServiceProvider.GetRequiredService>(); var rootMenuItem = new ApplicationMenuItem(DocsMenuNames.GroupName, l["Menu:DocumentManagement"], icon: "fa fa-book"); - context.Menu.AddItem(rootMenuItem); + administrationMenu.AddItem(rootMenuItem); if (await authorizationService.IsGrantedAsync(DocsAdminPermissions.Projects.Default)) { From f43209c6a47794b2b1124e93d2a8916ead2f1cce Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 26 Apr 2019 15:18:41 +0800 Subject: [PATCH 034/335] Rename GetAllConstants to GetPublicConstantsRecursively. --- .../Volo/Abp/Reflection/ReflectionHelper.cs | 39 +++++++++---------- .../Abp/Reflection/ReflectionHelper_Tests.cs | 12 +++--- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs index 27db5ae480..b314ca6b84 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/ReflectionHelper.cs @@ -172,35 +172,34 @@ namespace Volo.Abp.Reflection /// /// /// - public static string[] GetAllConstants(Type type) - { - var constants = new List(); - GetAllConstantsRecursively(constants, type, 1); - return constants.ToArray(); - } - - private static void GetAllConstantsRecursively(List constants, Type type, int currentDepth) + public static string[] GetPublicConstantsRecursively(Type type) { const int maxRecursiveParameterValidationDepth = 8; - if (currentDepth > maxRecursiveParameterValidationDepth) + var publicConstants = new List(); + + void Recursively(List constants, Type targetType, int currentDepth) { - return; - } + if (currentDepth > maxRecursiveParameterValidationDepth) + { + return; + } - constants.AddRange( - type.GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy) + constants.AddRange(targetType.GetFields(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy) .Where(x => x.IsLiteral && !x.IsInitOnly) - .Select(x => x.GetValue(null).ToString()) - ); + .Select(x => x.GetValue(null).ToString())); - var nestedTypes = type.GetNestedTypes(BindingFlags.Public); + var nestedTypes = targetType.GetNestedTypes(BindingFlags.Public); - foreach (var nestedType in nestedTypes) - { - GetAllConstantsRecursively(constants, nestedType, currentDepth + 1); + foreach (var nestedType in nestedTypes) + { + Recursively(constants, nestedType, currentDepth + 1); + } } - } + Recursively(publicConstants, type, 1); + + return publicConstants.ToArray(); + } } } diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/ReflectionHelper_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/ReflectionHelper_Tests.cs index cd2ec77b03..333ea2e84a 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/ReflectionHelper_Tests.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Reflection/ReflectionHelper_Tests.cs @@ -10,9 +10,9 @@ namespace Volo.Abp.Reflection [Fact] - public void GetAllConstants_Test() + public void GetPublicConstantsRecursively_Test() { - var constants = ReflectionHelper.GetAllConstants(typeof(BaseRole)); + var constants = ReflectionHelper.GetPublicConstantsRecursively(typeof(BaseRole)); constants.ShouldNotBeEmpty(); constants.Length.ShouldBe(1); @@ -20,9 +20,9 @@ namespace Volo.Abp.Reflection } [Fact] - public void GetAllConstants_Inherit_Test() + public void GetPublicConstantsRecursively_Inherit_Test() { - var constants = ReflectionHelper.GetAllConstants(typeof(Roles)); + var constants = ReflectionHelper.GetPublicConstantsRecursively(typeof(Roles)); constants.ShouldNotBeEmpty(); constants.Length.ShouldBe(2); @@ -32,9 +32,9 @@ namespace Volo.Abp.Reflection [Fact] - public void GetAllConstants_NestedTypes_Test() + public void GetPublicConstantsRecursively_NestedTypes_Test() { - var constants = ReflectionHelper.GetAllConstants(typeof(IdentityPermissions)); + var constants = ReflectionHelper.GetPublicConstantsRecursively(typeof(IdentityPermissions)); constants.ShouldNotBeEmpty(); constants.Except(IdentityPermissions.GetAll()).Count().ShouldBe(0); From 6b5893ff3dad3224a51a22847d392e9ddfd6e12b Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 26 Apr 2019 17:05:39 +0800 Subject: [PATCH 035/335] Lazy resolve services in the base classes. --- .../Mvc/UI/RazorPages/AbpPageModel.cs | 55 +++++++++++++++---- .../Volo/Abp/AspNetCore/Mvc/AbpController.cs | 49 +++++++++++++---- .../Services/ApplicationService.cs | 49 +++++++++++++---- .../Volo/Abp/Domain/Services/DomainService.cs | 28 +++++++++- 4 files changed, 146 insertions(+), 35 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/RazorPages/AbpPageModel.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/RazorPages/AbpPageModel.cs index 8fd16f5864..62258329ad 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/RazorPages/AbpPageModel.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/RazorPages/AbpPageModel.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Mvc.ViewFeatures; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; @@ -21,19 +22,43 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.RazorPages { public abstract class AbpPageModel : PageModel { - public IClock Clock { get; set; } + public IServiceProvider ServiceProvider { get; set; } + protected readonly object ServiceProviderLock = new object(); + protected TService LazyGetRequiredService(ref TService reference) + { + if (reference == null) + { + lock (ServiceProviderLock) + { + if (reference == null) + { + reference = ServiceProvider.GetRequiredService(); + } + } + } + + return reference; + } + + public IClock Clock => LazyGetRequiredService(ref _clock); + private IClock _clock; public AlertList Alerts => AlertManager.Alerts; - public IUnitOfWorkManager UnitOfWorkManager { get; set; } + public IUnitOfWorkManager UnitOfWorkManager => LazyGetRequiredService(ref _unitOfWorkManager); + private IUnitOfWorkManager _unitOfWorkManager; - public IObjectMapper ObjectMapper { get; set; } + public IObjectMapper ObjectMapper => LazyGetRequiredService(ref _objectMapper); + private IObjectMapper _objectMapper; - public IGuidGenerator GuidGenerator { get; set; } + public IGuidGenerator GuidGenerator => LazyGetRequiredService(ref _guidGenerator); + private IGuidGenerator _guidGenerator; - public ILoggerFactory LoggerFactory { get; set; } + public ILoggerFactory LoggerFactory => LazyGetRequiredService(ref _loggerFactory); + private ILoggerFactory _loggerFactory; - public IStringLocalizerFactory StringLocalizerFactory { get; set; } + public IStringLocalizerFactory StringLocalizerFactory => LazyGetRequiredService(ref _stringLocalizerFactory); + private IStringLocalizerFactory _stringLocalizerFactory; public IStringLocalizer L { @@ -56,17 +81,23 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.RazorPages protected Type LocalizationResourceType { get; set; } - public ICurrentUser CurrentUser { get; set; } + public ICurrentUser CurrentUser => LazyGetRequiredService(ref _currentUser); + private ICurrentUser _currentUser; - public ICurrentTenant CurrentTenant { get; set; } + public ICurrentTenant CurrentTenant => LazyGetRequiredService(ref _currentTenant); + private ICurrentTenant _currentTenant; - public ISettingProvider SettingProvider { get; set; } + public ISettingProvider SettingProvider => LazyGetRequiredService(ref _settingProvider); + private ISettingProvider _settingProvider; - public IModelStateValidator ModelValidator { get; set; } + public IModelStateValidator ModelValidator => LazyGetRequiredService(ref _modelValidator); + private IModelStateValidator _modelValidator; - public IAuthorizationService AuthorizationService { get; set; } + public IAuthorizationService AuthorizationService => LazyGetRequiredService(ref _authorizationService); + private IAuthorizationService _authorizationService; - public IAlertManager AlertManager { get; set; } + public IAlertManager AlertManager => LazyGetRequiredService(ref _alertManager); + private IAlertManager _alertManager; protected IUnitOfWork CurrentUnitOfWork => UnitOfWorkManager?.Current; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpController.cs index a5d206cf55..f0ee490ed1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpController.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpController.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Aspects; @@ -18,27 +19,55 @@ namespace Volo.Abp.AspNetCore.Mvc { public abstract class AbpController : Controller, IAvoidDuplicateCrossCuttingConcerns { - public IUnitOfWorkManager UnitOfWorkManager { get; set; } + public IServiceProvider ServiceProvider { get; set; } + protected readonly object ServiceProviderLock = new object(); + protected TService LazyGetRequiredService(ref TService reference) + { + if (reference == null) + { + lock (ServiceProviderLock) + { + if (reference == null) + { + reference = ServiceProvider.GetRequiredService(); + } + } + } + + return reference; + } + + public IUnitOfWorkManager UnitOfWorkManager => LazyGetRequiredService(ref _unitOfWorkManager); + private IUnitOfWorkManager _unitOfWorkManager; - public IObjectMapper ObjectMapper { get; set; } + public IObjectMapper ObjectMapper => LazyGetRequiredService(ref _objectMapper); + private IObjectMapper _objectMapper; - public IGuidGenerator GuidGenerator { get; set; } + public IGuidGenerator GuidGenerator => LazyGetRequiredService(ref _guidGenerator); + private IGuidGenerator _guidGenerator; - public ILoggerFactory LoggerFactory { get; set; } + public ILoggerFactory LoggerFactory => LazyGetRequiredService(ref _loggerFactory); + private ILoggerFactory _loggerFactory; - public ICurrentUser CurrentUser { get; set; } + public ICurrentUser CurrentUser => LazyGetRequiredService(ref _currentUser); + private ICurrentUser _currentUser; - public ICurrentTenant CurrentTenant { get; set; } + public ICurrentTenant CurrentTenant => LazyGetRequiredService(ref _currentTenant); + private ICurrentTenant _currentTenant; - public IAuthorizationService AuthorizationService { get; set; } + public IAuthorizationService AuthorizationService => LazyGetRequiredService(ref _authorizationService); + private IAuthorizationService _authorizationService; protected IUnitOfWork CurrentUnitOfWork => UnitOfWorkManager?.Current; - public IClock Clock { get; set; } + public IClock Clock => LazyGetRequiredService(ref _clock); + private IClock _clock; - public IModelStateValidator ModelValidator { get; set; } + public IModelStateValidator ModelValidator => LazyGetRequiredService(ref _modelValidator); + private IModelStateValidator _modelValidator; - public IFeatureChecker FeatureChecker { get; set; } + public IFeatureChecker FeatureChecker => LazyGetRequiredService(ref _featureChecker); + private IFeatureChecker _featureChecker; public List AppliedCrossCuttingConcerns { get; } = new List(); diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs index 3b2bbc7582..909ad40940 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs @@ -1,5 +1,6 @@ using JetBrains.Annotations; using Microsoft.AspNetCore.Authorization; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; @@ -31,31 +32,59 @@ namespace Volo.Abp.Application.Services IAuditingEnabled, ITransientDependency { + public IServiceProvider ServiceProvider { get; set; } + protected readonly object ServiceProviderLock = new object(); + protected TService LazyGetRequiredService(ref TService reference) + { + if (reference == null) + { + lock (ServiceProviderLock) + { + if (reference == null) + { + reference = ServiceProvider.GetRequiredService(); + } + } + } + + return reference; + } + public static string[] CommonPostfixes { get; set; } = { "AppService", "ApplicationService", "Service" }; public List AppliedCrossCuttingConcerns { get; } = new List(); - public IUnitOfWorkManager UnitOfWorkManager { get; set; } + public IUnitOfWorkManager UnitOfWorkManager => LazyGetRequiredService(ref _unitOfWorkManager); + private IUnitOfWorkManager _unitOfWorkManager; - public IObjectMapper ObjectMapper { get; set; } + public IObjectMapper ObjectMapper => LazyGetRequiredService(ref _objectMapper); + private IObjectMapper _objectMapper; public IGuidGenerator GuidGenerator { get; set; } - public ILoggerFactory LoggerFactory { get; set; } + public ILoggerFactory LoggerFactory => LazyGetRequiredService(ref _loggerFactory); + private ILoggerFactory _loggerFactory; - public ICurrentTenant CurrentTenant { get; set; } + public ICurrentTenant CurrentTenant => LazyGetRequiredService(ref _currentTenant); + private ICurrentTenant _currentTenant; - public ICurrentUser CurrentUser { get; set; } + public ICurrentUser CurrentUser => LazyGetRequiredService(ref _currentUser); + private ICurrentUser _currentUser; - public ISettingProvider SettingProvider { get; set; } + public ISettingProvider SettingProvider => LazyGetRequiredService(ref _settingProvider); + private ISettingProvider _settingProvider; - public IClock Clock { get; set; } + public IClock Clock => LazyGetRequiredService(ref _clock); + private IClock _clock; - public IAuthorizationService AuthorizationService { get; set; } + public IAuthorizationService AuthorizationService => LazyGetRequiredService(ref _authorizationService); + private IAuthorizationService _authorizationService; - public IFeatureChecker FeatureChecker { get; set; } + public IFeatureChecker FeatureChecker => LazyGetRequiredService(ref _featureChecker); + private IFeatureChecker _featureChecker; - public IStringLocalizerFactory StringLocalizerFactory { get; set; } + public IStringLocalizerFactory StringLocalizerFactory => LazyGetRequiredService(ref _stringLocalizerFactory); + private IStringLocalizerFactory _stringLocalizerFactory; public IStringLocalizer L => _localizer ?? (_localizer = StringLocalizerFactory.Create(LocalizationResource)); private IStringLocalizer _localizer; diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Services/DomainService.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Services/DomainService.cs index ea94690d61..14e8a64131 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Services/DomainService.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Services/DomainService.cs @@ -1,4 +1,5 @@ using System; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Guids; @@ -9,13 +10,34 @@ namespace Volo.Abp.Domain.Services { public abstract class DomainService : IDomainService { - public IClock Clock { get; set; } + public IServiceProvider ServiceProvider { get; set; } + protected readonly object ServiceProviderLock = new object(); + protected TService LazyGetRequiredService(ref TService reference) + { + if (reference == null) + { + lock (ServiceProviderLock) + { + if (reference == null) + { + reference = ServiceProvider.GetRequiredService(); + } + } + } + + return reference; + } + + public IClock Clock => LazyGetRequiredService(ref _clock); + private IClock _clock; public IGuidGenerator GuidGenerator { get; set; } - public ILoggerFactory LoggerFactory { get; set; } + public ILoggerFactory LoggerFactory => LazyGetRequiredService(ref _loggerFactory); + private ILoggerFactory _loggerFactory; - public ICurrentTenant CurrentTenant { get; set; } + public ICurrentTenant CurrentTenant => LazyGetRequiredService(ref _currentTenant); + private ICurrentTenant _currentTenant; protected ILogger Logger => _lazyLogger.Value; private Lazy _lazyLogger => new Lazy(() => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance, true); From 190886d514fff226f76542c16028f0ac15534217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Fri, 26 Apr 2019 17:15:15 +0800 Subject: [PATCH 036/335] Add languages menu and localization texts for blogging module --- .../Volo.BloggingTestApp/BloggingTestAppModule.cs | 2 +- .../src/Volo.Blogging.Web/BloggingWebModule.cs | 3 +++ .../Localization/Resources/Blogging/Web/en.json | 8 +++++++- .../Localization/Resources/Blogging/Web/pt-BR.json | 8 +++++++- .../Localization/Resources/Blogging/Web/tr.json | 8 +++++++- .../Localization/Resources/Blogging/Web/zh-Hans.json | 12 +++++++++--- 6 files changed, 34 insertions(+), 7 deletions(-) diff --git a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs index 248d1433cc..84ed5d1910 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs +++ b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs @@ -98,7 +98,7 @@ namespace Volo.BloggingTestApp options.CustomSchemaIds(type => type.FullName); }); - var cultures = new List { new CultureInfo("en"), new CultureInfo("tr") }; + var cultures = new List { new CultureInfo("en"), new CultureInfo("tr"),new CultureInfo("zh-Hans") }; Configure(options => { options.DefaultRequestCulture = new RequestCulture("en"); diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs index 9071dee2d6..20678ddc37 100644 --- a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs @@ -45,6 +45,9 @@ namespace Volo.Blogging Configure(options => { + options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); options.Resources .Get() .AddBaseTypes(typeof(AbpValidationResource)) diff --git a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/en.json b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/en.json index 444c3d80af..b84b1f2483 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/en.json +++ b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/en.json @@ -36,6 +36,12 @@ "CoverImage": "Cover Image", "CreateANewPost": "Create A New Post", "CreateANewBlog": "Create A New Blog", - "WhatIsNew": "What is new?" + "WhatIsNew": "What is new?", + "Name": "Name", + "ShortName": "Short Name", + "CreationTime": "Creation Time", + "Description": "Description", + "Blogs": "Blogs", + "Tags": "Tags" } } \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/pt-BR.json b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/pt-BR.json index cf98e56b06..62416f49a5 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/pt-BR.json +++ b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/pt-BR.json @@ -36,6 +36,12 @@ "CoverImage": "Imagem de Capa", "CreateANewPost": "Criar uma nova Postagem", "CreateANewBlog": "Criar um novo Blog", - "WhatIsNew": "O que há de novo?" + "WhatIsNew": "O que há de novo?", + "Name": "Nome", + "ShortName": "Nome Curto", + "CreationTime": "Hora da criação", + "Description": "Descrição", + "Blogs": "Blogs", + "Tags": "Etiquetas" } } \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json index dc5df7f0d0..bb8b23f9d2 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json +++ b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json @@ -36,6 +36,12 @@ "CoverImage": "Kapak resmi", "CreateANewPost": "Yeni Yazı oluştur", "CreateANewBlog": "Yeni Blog Ekle", - "WhatIsNew": "Yeniler" + "WhatIsNew": "Yeniler", + "Name": "İsim", + "ShortName": "Kısa isim", + "CreationTime": "Yaratma zamanı", + "Description": "Açıklama", + "Blogs": "Bloglar", + "Tags": "Etiketler" } } \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/zh-Hans.json b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/zh-Hans.json index a67e325497..2ea614b648 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/zh-Hans.json +++ b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/zh-Hans.json @@ -36,6 +36,12 @@ "CoverImage": "封面图", "CreateANewPost": "创建一个新帖子", "CreateANewBlog": "创建一个新博客", - "WhatIsNew": "最新消息" - } - } \ No newline at end of file + "WhatIsNew": "最新消息", + "Name": "名称", + "ShortName": "简称", + "CreationTime": "创建时间", + "Description": "描述", + "Blogs": "博客", + "Tags": "标签" + } +} \ No newline at end of file From bb8edb70fd038c7a9273fcde61ea690e5424e97c Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 26 Apr 2019 17:43:23 +0800 Subject: [PATCH 037/335] Use GetPublicConstantsRecursively in Permissions.GetAll. --- .../Volo/Blogging/BloggingPermissions.cs | 26 +++---------------- .../Volo/Docs/Admin/DocsAdminPermissions.cs | 13 +++------- .../Volo/Abp/Identity/IdentityPermissions.cs | 20 +++----------- .../TenantManagementPermissions.cs | 15 +++-------- .../Permissions/BookStorePermissions.cs | 3 ++- .../ProductManagementPermissions.cs | 13 +++------- .../MyProjectName/MyProjectNamePermissions.cs | 9 +++---- .../Permissions/MyProjectNamePermissions.cs | 3 ++- .../MyProjectName/MyProjectNamePermissions.cs | 9 +++---- 9 files changed, 32 insertions(+), 79 deletions(-) diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissions.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissions.cs index e73dc334da..fae85acf88 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissions.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/BloggingPermissions.cs @@ -1,4 +1,6 @@ -namespace Volo.Blogging +using Volo.Abp.Reflection; + +namespace Volo.Blogging { public class BloggingPermissions { @@ -39,27 +41,7 @@ public static string[] GetAll() { - return new[] - { - GroupName, - Blogs.Default, - Blogs.Management, - Blogs.Delete, - Blogs.Update, - Blogs.Create, - Posts.Default, - Posts.Delete, - Posts.Update, - Posts.Create, - Tags.Default, - Tags.Delete, - Tags.Update, - Tags.Create, - Comments.Default, - Comments.Delete, - Comments.Update, - Comments.Create - }; + return ReflectionHelper.GetPublicConstantsRecursively(typeof(BloggingPermissions)); } } } diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminPermissions.cs b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminPermissions.cs index 565b70c7f5..341f4c5819 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminPermissions.cs +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminPermissions.cs @@ -1,4 +1,6 @@ -namespace Volo.Docs.Admin +using Volo.Abp.Reflection; + +namespace Volo.Docs.Admin { public class DocsAdminPermissions { @@ -14,14 +16,7 @@ public static string[] GetAll() { - return new[] - { - GroupName, - Projects.Default, - Projects.Delete, - Projects.Update, - Projects.Create, - }; + return ReflectionHelper.GetPublicConstantsRecursively(typeof(DocsAdminPermissions)); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityPermissions.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityPermissions.cs index 339122c2a8..e22869295f 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityPermissions.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityPermissions.cs @@ -1,4 +1,6 @@ -namespace Volo.Abp.Identity +using Volo.Abp.Reflection; + +namespace Volo.Abp.Identity { public static class IdentityPermissions { @@ -29,21 +31,7 @@ public static string[] GetAll() { - return new[] - { - GroupName, - Roles.Default, - Roles.Create, - Roles.Update, - Roles.Delete, - Roles.ManagePermissions, - Users.Default, - Users.Create, - Users.Update, - Users.Delete, - Users.ManagePermissions, - UserLookup.Default - }; + return ReflectionHelper.GetPublicConstantsRecursively(typeof(IdentityPermissions)); } } } \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/TenantManagementPermissions.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/TenantManagementPermissions.cs index 6bc90271bc..49afb47c25 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/TenantManagementPermissions.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/TenantManagementPermissions.cs @@ -1,4 +1,6 @@ -namespace Volo.Abp.TenantManagement +using Volo.Abp.Reflection; + +namespace Volo.Abp.TenantManagement { public static class TenantManagementPermissions { @@ -16,16 +18,7 @@ public static string[] GetAll() { - return new[] - { - GroupName, - Tenants.Default, - Tenants.Create, - Tenants.Update, - Tenants.Delete, - Tenants.ManageFeatures, - Tenants.ManageConnectionStrings - }; + return ReflectionHelper.GetPublicConstantsRecursively(typeof(TenantManagementPermissions)); } } } \ No newline at end of file diff --git a/samples/BookStore/src/Acme.BookStore.Application/Permissions/BookStorePermissions.cs b/samples/BookStore/src/Acme.BookStore.Application/Permissions/BookStorePermissions.cs index b1ec575904..ea8a26d6ef 100644 --- a/samples/BookStore/src/Acme.BookStore.Application/Permissions/BookStorePermissions.cs +++ b/samples/BookStore/src/Acme.BookStore.Application/Permissions/BookStorePermissions.cs @@ -1,4 +1,5 @@ using System; +using Volo.Abp.Reflection; namespace Acme.BookStore.Permissions { @@ -12,7 +13,7 @@ namespace Acme.BookStore.Permissions public static string[] GetAll() { //Return an array of all permissions - return Array.Empty(); + return ReflectionHelper.GetPublicConstantsRecursively(typeof(BookStorePermissions)); } } } \ No newline at end of file diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement/ProductManagementPermissions.cs b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement/ProductManagementPermissions.cs index b4dd949a73..eebc8cb29c 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement/ProductManagementPermissions.cs +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement/ProductManagementPermissions.cs @@ -1,4 +1,6 @@ -namespace ProductManagement +using Volo.Abp.Reflection; + +namespace ProductManagement { public class ProductManagementPermissions { @@ -14,14 +16,7 @@ } public static string[] GetAll() { - return new[] - { - GroupName, - Products.Default, - Products.Delete, - Products.Update, - Products.Create - }; + return ReflectionHelper.GetPublicConstantsRecursively(typeof(ProductManagementPermissions)); } } } \ No newline at end of file diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs b/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs index 88e7a3c05b..00d1124498 100644 --- a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs +++ b/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs @@ -1,4 +1,6 @@ -namespace MyCompanyName.MyProjectName +using Volo.Abp.Reflection; + +namespace MyCompanyName.MyProjectName { public class MyProjectNamePermissions { @@ -6,10 +8,7 @@ public static string[] GetAll() { - return new[] - { - GroupName - }; + return ReflectionHelper.GetPublicConstantsRecursively(typeof(MyProjectNamePermissions)); } } } \ No newline at end of file diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.Application/Permissions/MyProjectNamePermissions.cs b/templates/mvc/src/MyCompanyName.MyProjectName.Application/Permissions/MyProjectNamePermissions.cs index 4e499ae2ed..0646692500 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.Application/Permissions/MyProjectNamePermissions.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.Application/Permissions/MyProjectNamePermissions.cs @@ -1,4 +1,5 @@ using System; +using Volo.Abp.Reflection; namespace MyCompanyName.MyProjectName.Permissions { @@ -12,7 +13,7 @@ namespace MyCompanyName.MyProjectName.Permissions public static string[] GetAll() { //Return an array of all permissions - return Array.Empty(); + return ReflectionHelper.GetPublicConstantsRecursively(typeof(MyProjectNamePermissions)); } } } \ No newline at end of file diff --git a/templates/service/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs b/templates/service/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs index 88e7a3c05b..00d1124498 100644 --- a/templates/service/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs +++ b/templates/service/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs @@ -1,4 +1,6 @@ -namespace MyCompanyName.MyProjectName +using Volo.Abp.Reflection; + +namespace MyCompanyName.MyProjectName { public class MyProjectNamePermissions { @@ -6,10 +8,7 @@ public static string[] GetAll() { - return new[] - { - GroupName - }; + return ReflectionHelper.GetPublicConstantsRecursively(typeof(MyProjectNamePermissions)); } } } \ No newline at end of file From 4206528ff90dea98c80080523d65c7030c4394d4 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 26 Apr 2019 12:44:43 +0300 Subject: [PATCH 038/335] Update tr.json https://github.com/abpframework/abp/pull/1060 --- .../Localization/Resources/Blogging/Web/tr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json index bb8b23f9d2..7747638587 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json +++ b/modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json @@ -39,7 +39,7 @@ "WhatIsNew": "Yeniler", "Name": "İsim", "ShortName": "Kısa isim", - "CreationTime": "Yaratma zamanı", + "CreationTime": "Oluşturulma zamanı", "Description": "Açıklama", "Blogs": "Bloglar", "Tags": "Etiketler" From 35fc002c0aaba9ece0b74838cf73e6f8a60e41cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B6=9B?= Date: Fri, 26 Apr 2019 18:05:57 +0800 Subject: [PATCH 039/335] Add branding provider and improve localization --- .../BloggingTestAppBrandingProvider.cs | 18 ++++++++++++++++++ .../Volo.Blogging.Web/Pages/Blog/Index.cshtml | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 modules/blogging/app/Volo.BloggingTestApp/Branding/BloggingTestAppBrandingProvider.cs diff --git a/modules/blogging/app/Volo.BloggingTestApp/Branding/BloggingTestAppBrandingProvider.cs b/modules/blogging/app/Volo.BloggingTestApp/Branding/BloggingTestAppBrandingProvider.cs new file mode 100644 index 0000000000..e5a8046ff7 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/Branding/BloggingTestAppBrandingProvider.cs @@ -0,0 +1,18 @@ +using Microsoft.AspNetCore.Mvc.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components; +using Volo.Abp.DependencyInjection; +using Volo.Blogging.Localization; + +namespace Volo.BloggingTestApp.Branding +{ + [Dependency(ReplaceServices = true)] + public class BloggingTestAppBrandingProvider : DefaultBrandingProvider + { + public IHtmlLocalizer L { get; set; } + public BloggingTestAppBrandingProvider(IHtmlLocalizer localizer) + { + L = localizer; + } + public override string AppName => L["Blogs"].Value; + } +} diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml index fadaaab269..97f06b6dc0 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Index.cshtml @@ -1,12 +1,12 @@ @page @using Volo.Blogging.Pages.Blog -@*inherits BloggingPage*@ +@inherits BloggingPage @model IndexModel @{ ViewBag.PageTitle = "Blog"; }

    - Blogs + @L["Blogs"]

      From e9be89d57c625faca5b4f0b986c2a143d67e3436 Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 26 Apr 2019 20:42:46 +0800 Subject: [PATCH 040/335] fix #1058 Perform non-null validation on propertyName(context.Key.Name). --- ...AutoLocalizationMetadataDetailsProvider.cs | 5 ++++ .../Validation/ValidationTestController.cs | 25 ++++++++++++++++++- .../ValidationTestController_Tests.cs | 11 ++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpDataAnnotationAutoLocalizationMetadataDetailsProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpDataAnnotationAutoLocalizationMetadataDetailsProvider.cs index 2274f0a9b6..d9de135e7f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpDataAnnotationAutoLocalizationMetadataDetailsProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpDataAnnotationAutoLocalizationMetadataDetailsProvider.cs @@ -39,6 +39,11 @@ namespace Volo.Abp.AspNetCore.Mvc return; } + if (context.Key.Name.IsNullOrWhiteSpace()) + { + return; + } + if (_localizationOptions.Value.Value.DataAnnotationLocalizerProvider == null) { return; diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController.cs index b9d01a86c4..6bb9a5ae94 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Shouldly; @@ -16,6 +17,14 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation return Task.FromResult(model.Value1); } + [HttpGet] + [Route("object-result-action-with-custom_validate")] + public Task ObjectResultActionWithCustomValidate(CustomValidateModel model) + { + ModelState.IsValid.ShouldBeTrue(); //AbpValidationFilter throws exception otherwise + return Task.FromResult(model.Value1); + } + [HttpGet] [Route("action-result-action")] public IActionResult ActionResultAction(ValidationTest1Model model) @@ -29,5 +38,19 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation [MinLength(2)] public string Value1 { get; set; } } + + public class CustomValidateModel : IValidatableObject + { + public string Value1 { get; set; } + + public IEnumerable Validate(ValidationContext validationContext) + { + if (Value1 != "hello") + { + yield return new ValidationResult("Value1 should be hello"); + } + } + } + } } \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController_Tests.cs index 19a4bcd608..5177868843 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Validation/ValidationTestController_Tests.cs @@ -47,5 +47,16 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation var result = await GetResponseAsStringAsync("/api/validation-test/action-result-action"); //Missed the value1 result.ShouldBe("ModelState.IsValid: false"); } + + [Fact] + public async Task Should_Return_Custom_Validate_Errors() + { + var result = await GetResponseAsObjectAsync( + "/api/validation-test/object-result-action-with-custom_validate?value1=abc", HttpStatusCode.BadRequest); //value1 should be hello. + + result.Error.ValidationErrors.Length.ShouldBeGreaterThan(0); + result.Error.ValidationErrors.ShouldContain(x => x.Message == "Value1 should be hello"); + } + } } From fa32c1427b1ff0bfebcaf15f8d8737b560b41413 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Sat, 27 Apr 2019 00:38:09 +0800 Subject: [PATCH 041/335] Fix spelling mistakes --- docs/en/Exception-Handling.md | 4 ++-- docs/en/Microservice-Architecture.md | 2 +- docs/en/Tutorials/AspNetCore-Mvc/Part-I.md | 4 ++-- docs/zh-Hans/Exception-Handling.md | 2 +- .../TagHelpers/Form/AbpInputTagHelperService.cs | 8 ++++---- .../TagHelpers/Form/AbpRadioInputTagHelperService.cs | 8 ++++---- .../TagHelpers/Form/AbpSelectTagHelperService.cs | 8 ++++---- .../ExceptionHandling/AbpExceptionHandlingMiddleware.cs | 2 +- .../DependencyInjection/AutofacServiceProviderFactory.cs | 2 +- .../DependencyInjection/ServiceCollectionExtensions.cs | 2 +- .../Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs | 2 +- framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs | 4 ++-- .../Entities/Events/Distributed/EntityToEtoMapper.cs | 2 +- .../Abp/Security/Encryption/StringEncryptionOptions.cs | 2 +- .../Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs | 2 +- .../Versioning/AbpAspNetCoreMvcVersioningTestModule.cs | 2 +- .../Volo/Abp/Auditing/AuditingInterceptor_Tests.cs | 2 +- .../AbpConventionalDependencyInjectionExtensions_Tests.cs | 6 +++--- .../Volo/Abp/BackgroundJobs/BackgroundJobRecord.cs | 2 +- 19 files changed, 33 insertions(+), 33 deletions(-) diff --git a/docs/en/Exception-Handling.md b/docs/en/Exception-Handling.md index 144c6016dd..93bad2b6ed 100644 --- a/docs/en/Exception-Handling.md +++ b/docs/en/Exception-Handling.md @@ -29,7 +29,7 @@ Error Message is an instance of the `RemoteServiceErrorResponse` class. The simp } ```` -There are **optional fields** those can be filled based upon the exception that has occured. +There are **optional fields** those can be filled based upon the exception that has occurred. ##### Error Code @@ -70,7 +70,7 @@ Error **details** in an optional field of the JSON error message. Thrown `Except "code": "App:010046", "message": "Your request is not valid, please correct and try again!", "validationErrors": [{ - "message": "Username should be minimum lenght of 3.", + "message": "Username should be minimum length of 3.", "members": ["userName"] }, { diff --git a/docs/en/Microservice-Architecture.md b/docs/en/Microservice-Architecture.md index e30c070a01..ff85873ee7 100644 --- a/docs/en/Microservice-Architecture.md +++ b/docs/en/Microservice-Architecture.md @@ -19,7 +19,7 @@ One of the major goals of the ABP framework is to provide a convenient infrastru ## Microservice for New Applications -One common advise to start a new solution is **always to start with a monolith**, keep it modular and split into microservices once the monolith becomes a problem. This makes your progress fast in the beginning especially if your team is small and you don't want to deal with challanges of the microservice architecture. +One common advise to start a new solution is **always to start with a monolith**, keep it modular and split into microservices once the monolith becomes a problem. This makes your progress fast in the beginning especially if your team is small and you don't want to deal with challenges of the microservice architecture. However, developing such a well-modular application can be a problem since it is **hard to keep modules isolated** from each other as you would do it for microservices (see [Stefan Tilkov's article](https://martinfowler.com/articles/dont-start-monolith.html) about that). Microservice architecture naturally forces you to develop well isolated services, but in a modular monolithic application it's easy to tight couple modules to each other and design **weak module boundaries** and API contracts. diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md index a841b6ad65..ecc302c34d 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md @@ -151,7 +151,7 @@ namespace Acme.BookStore * **DTO** classes are used to **transfer data** between the *presentation layer* and the *application layer*. See the [Data Transfer Objects document](../../Data-Transfer-Objects.md) for more details. * `BookDto` is used to transfer book data to the presentation layer in order to show the book information on the UI. * `BookDto` is derived from the `AuditedEntityDto` which has audit properties just like the `Book` class defined above. -* `[AutoMapFrom(typeof(Book))]` is used to create AutoMapper mapping from the `Book` class to the `BookDto` class. In this way, you get automatic convertion of `Book` objects to `BookDto` objects (instead of manually copy all properties). +* `[AutoMapFrom(typeof(Book))]` is used to create AutoMapper mapping from the `Book` class to the `BookDto` class. In this way, you get automatic conversion of `Book` objects to `BookDto` objects (instead of manually copy all properties). #### CreateUpdateBookDto @@ -425,7 +425,7 @@ $(function () { ```` * `abp.libs.datatables.createAjax` is a helper function to adapt ABP's dynamic JavaScript API proxies to Datatable's format. -* `abp.libs.datatables.normalizeConfiguration` is another helper function. There's no requirment to use it, but it simplifies the datatables configuration by providing conventional values for missing options. +* `abp.libs.datatables.normalizeConfiguration` is another helper function. There's no requirement to use it, but it simplifies the datatables configuration by providing conventional values for missing options. * `acme.bookStore.book.getList` is the function to get list of books (you have seen it before). * See [Datatable's documentation](https://datatables.net/manual/) for more configuration options. diff --git a/docs/zh-Hans/Exception-Handling.md b/docs/zh-Hans/Exception-Handling.md index ecb4acf5e7..a251c50f61 100644 --- a/docs/zh-Hans/Exception-Handling.md +++ b/docs/zh-Hans/Exception-Handling.md @@ -70,7 +70,7 @@ ABP提供了用于处理Web应用程序异常的标准模型. "code": "App:010046", "message": "Your request is not valid, please correct and try again!", "validationErrors": [{ - "message": "Username should be minimum lenght of 3.", + "message": "Username should be minimum length of 3.", "members": ["userName"] }, { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs index cdf1f30788..dc2f04b623 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs @@ -35,10 +35,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form TagHelper.AspFor.Name, SurroundInnerHtmlAndGet(context, output, innerHtml, isCheckbox), order, - out var surpress + out var suppress ); - if (surpress) + if (suppress) { output.SuppressOutput(); } @@ -389,10 +389,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form return idAttr != null ? "for=\"" + idAttr.Value + "\"" : ""; } - protected virtual void AddGroupToFormGroupContents(TagHelperContext context, string propertyName, string html, int order, out bool surpress) + protected virtual void AddGroupToFormGroupContents(TagHelperContext context, string propertyName, string html, int order, out bool suppress) { var list = context.GetValue>(FormGroupContents) ?? new List(); - surpress = list == null; + suppress = list == null; if (list != null && !list.Any(igc => igc.HtmlContent.Contains("id=\"" + propertyName.Replace('.', '_') + "\""))) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpRadioInputTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpRadioInputTagHelperService.cs index 6ec2911714..f89d3c1fee 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpRadioInputTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpRadioInputTagHelperService.cs @@ -29,9 +29,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form var html = GetHtml(context, output, selectItems); - AddGroupToFormGroupContents(context, TagHelper.AspFor.Name, html, order, out var surpress); + AddGroupToFormGroupContents(context, TagHelper.AspFor.Name, html, order, out var suppress); - if (surpress) + if (suppress) { output.SuppressOutput(); } @@ -157,10 +157,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form return TagHelper.AspFor.ModelExplorer.Model?.ToString(); } - protected virtual void AddGroupToFormGroupContents(TagHelperContext context, string propertyName, string html, int order, out bool surpress) + protected virtual void AddGroupToFormGroupContents(TagHelperContext context, string propertyName, string html, int order, out bool suppress) { var list = context.GetValue>(FormGroupContents) ?? new List(); - surpress = list == null; + suppress = list == null; if (list != null && !list.Any(igc => igc.HtmlContent.Contains("id=\"" + propertyName.Replace('.', '_') + "\""))) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs index cd3294d66f..2c7e6ad1cf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs @@ -33,9 +33,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form var order = TagHelper.AspFor.ModelExplorer.GetDisplayOrder(); - AddGroupToFormGroupContents(context, TagHelper.AspFor.Name, SurroundInnerHtmlAndGet(context, output, innerHtml), order, out var surpress); + AddGroupToFormGroupContents(context, TagHelper.AspFor.Name, SurroundInnerHtmlAndGet(context, output, innerHtml), order, out var suppress); - if (surpress) + if (suppress) { output.SuppressOutput(); } @@ -304,10 +304,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form return idAttr != null ? "for=\"" + idAttr.Value + "\"" : ""; } - protected virtual void AddGroupToFormGroupContents(TagHelperContext context, string propertyName, string html, int order, out bool surpress) + protected virtual void AddGroupToFormGroupContents(TagHelperContext context, string propertyName, string html, int order, out bool suppress) { var list = context.GetValue>(FormGroupContents) ?? new List(); - surpress = list == null; + suppress = list == null; if (list != null && !list.Any(igc => igc.HtmlContent.Contains("id=\"" + propertyName.Replace('.', '_') + "\""))) { diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs index 502fbda5bb..f36a7f4860 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling // We can't do anything if the response has already started, just abort. if (httpContext.Response.HasStarted) { - _logger.LogWarning("An exception occured, but response has already started!"); + _logger.LogWarning("An exception occurred, but response has already started!"); throw; } diff --git a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProviderFactory.cs b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProviderFactory.cs index 8e0d4f574d..21a7ca331d 100644 --- a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProviderFactory.cs +++ b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProviderFactory.cs @@ -38,7 +38,7 @@ namespace Autofac.Extensions.DependencyInjection /// /// Initializes a new instance of the class. /// - /// Action on a that adds component registrations to the conatiner. + /// Action on a that adds component registrations to the container. public AutofacServiceProviderFactory(Action configurationAction = null) { _configurationAction = configurationAction ?? (builder => { }); diff --git a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/ServiceCollectionExtensions.cs b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/ServiceCollectionExtensions.cs index 5552cda7b2..1195cb9fb1 100644 --- a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/ServiceCollectionExtensions.cs +++ b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/ServiceCollectionExtensions.cs @@ -37,7 +37,7 @@ namespace Autofac.Extensions.DependencyInjection /// Adds the to the service collection. /// /// The service collection to add the factory to. - /// Action on a that adds component registrations to the conatiner. + /// Action on a that adds component registrations to the container. /// The service collection. public static IServiceCollection AddAutofac(this IServiceCollection services, Action configurationAction = null) { diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs index 7e1154ec7e..6241bc81f9 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs @@ -42,7 +42,7 @@ namespace Volo.Abp.BackgroundJobs public virtual DateTime? LastTryTime { get; set; } /// - /// This is true if this job is continously failed and will not be executed again. + /// This is true if this job is continuously failed and will not be executed again. /// public virtual bool IsAbandoned { get; set; } diff --git a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs index a7cf7c763e..31e7f257d4 100644 --- a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs @@ -84,11 +84,11 @@ namespace System } /// - /// Gets index of nth occurence of a char in a string. + /// Gets index of nth occurrence of a char in a string. /// /// source string to be searched /// Char to search in - /// Count of the occurence + /// Count of the occurrence public static int NthIndexOf(this string str, char c, int n) { Check.NotNull(str, nameof(str)); diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs index 354f72dddc..fd7cab1f4f 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs @@ -39,7 +39,7 @@ namespace Volo.Abp.Domain.Entities.Events.Distributed return new EntityEto(keys); } - //TODO: Also add KeysAsString property to resulting json for compability with the EntityEto! + //TODO: Also add KeysAsString property to resulting json for compatibility with the EntityEto! return ObjectMapper.Map(entityType, etoType, entityObj); } } diff --git a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionOptions.cs b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionOptions.cs index 91768d37e8..67eae167c3 100644 --- a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionOptions.cs +++ b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Encryption/StringEncryptionOptions.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.Security.Encryption /// /// Default password to encrypt/decrypt texts. - /// It's recommented to set to another value for security. + /// It's recommended to set to another value for security. /// Default value: "gsKnGZ041HLL4IM8" /// public string DefaultPassPhrase { get; set; } diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs index 4218a9693f..df867c2320 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs @@ -9,7 +9,7 @@ namespace Volo.Abp.Uow public class UnitOfWorkFailedEventArgs : UnitOfWorkEventArgs { /// - /// Exception that caused failure. This is set only if an error occured during . + /// Exception that caused failure. This is set only if an error occurred during . /// Can be null if there is no exception, but is not called. /// Can be null if another exception occurred during the UOW. /// diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs index 728b119a19..24a76e3766 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning opts.ApiVersions.Add(new ApiVersion(2, 0)); }); - //1.0 Compatability version + //1.0 Compatibility version options.ConventionalControllers.Create(typeof(AbpAspNetCoreMvcVersioningTestModule).Assembly, opts => { opts.TypePredicate = t => t.Namespace == typeof(Volo.Abp.AspNetCore.Mvc.Versioning.App.Compat.TodoAppService).Namespace; diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs index 141bf01688..23eba6c53b 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AuditingInterceptor_Tests.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.Auditing using (var scope = _auditingManager.BeginScope()) { - await myAuditedObject1.DoItAsync(new InputObject { Value1 = "fourty-two", Value2 = 42 }); + await myAuditedObject1.DoItAsync(new InputObject { Value1 = "forty-two", Value2 = 42 }); await scope.SaveAsync(); } diff --git a/framework/test/Volo.Abp.Core.Tests/Microsoft/Extensions/DependencyInjection/AbpConventionalDependencyInjectionExtensions_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Microsoft/Extensions/DependencyInjection/AbpConventionalDependencyInjectionExtensions_Tests.cs index 369ee98cb9..dc02cf4e2d 100644 --- a/framework/test/Volo.Abp.Core.Tests/Microsoft/Extensions/DependencyInjection/AbpConventionalDependencyInjectionExtensions_Tests.cs +++ b/framework/test/Volo.Abp.Core.Tests/Microsoft/Extensions/DependencyInjection/AbpConventionalDependencyInjectionExtensions_Tests.cs @@ -85,7 +85,7 @@ namespace Microsoft.Extensions.DependencyInjection //Assert - //Check descriptons in service collection + //Check descriptions in service collection var descriptions = _services.Where(s => s.ServiceType == typeof(IMyService)).ToList(); descriptions.Count.ShouldBe(2); descriptions[0].ImplementationType.ShouldBe(typeof(FirstImplOfMyService)); @@ -113,7 +113,7 @@ namespace Microsoft.Extensions.DependencyInjection //Assert - //Check descriptons in service collection + //Check descriptions in service collection var descriptions = _services.Where(s => s.ServiceType == typeof(IMyService)).ToList(); descriptions.Count.ShouldBe(1); descriptions[0].ImplementationType.ShouldBe(typeof(FirstImplOfMyService)); @@ -139,7 +139,7 @@ namespace Microsoft.Extensions.DependencyInjection //Assert - //Check descriptons in service collection + //Check descriptions in service collection var descriptions = _services.Where(s => s.ServiceType == typeof(IMyService)).ToList(); descriptions.Count.ShouldBe(1); descriptions[0].ImplementationType.ShouldBe(typeof(MyServiceReplacesIMyService)); diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobRecord.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobRecord.cs index 0c18e9f877..c3684d9cfe 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobRecord.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobRecord.cs @@ -39,7 +39,7 @@ namespace Volo.Abp.BackgroundJobs public virtual DateTime? LastTryTime { get; set; } /// - /// This is true if this job is continously failed and will not be executed again. + /// This is true if this job is continuously failed and will not be executed again. /// public virtual bool IsAbandoned { get; set; } From f655540555712410cccf722f4bda46f465a11e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C3=87AGDA=C5=9E?= Date: Fri, 26 Apr 2019 22:38:48 +0300 Subject: [PATCH 042/335] updated all nuget packages --- .../Volo.AbpWebSite.Domain/Volo.AbpWebSite.Domain.csproj | 2 +- .../Volo.Utils.SolutionTemplating.csproj | 2 +- .../Volo.Abp.AspNetCore.Mvc.csproj | 2 +- .../src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj | 2 +- .../src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj | 2 +- framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj | 2 +- framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj | 6 +++--- .../Volo.Abp.EntityFrameworkCore.SqlServer.csproj | 2 +- .../Volo.Abp.EntityFrameworkCore.csproj | 4 ++-- .../Volo.Abp.FluentValidation.csproj | 2 +- framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj | 2 +- .../Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj | 2 +- framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj | 2 +- .../Volo.Abp.Localization/Volo.Abp.Localization.csproj | 2 +- framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj | 2 +- framework/test/AbpTestBase/AbpTestBase.csproj | 4 ++-- .../Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj | 2 +- .../Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj | 2 +- .../Volo.Abp.AspNetCore.Mvc.Tests.csproj | 2 +- ...Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj | 2 +- .../Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj | 6 +++--- .../Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj | 2 +- .../Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj | 2 +- .../Volo.Abp.AspNetCore.Tests.csproj | 2 +- .../Volo.Abp.Auditing.Tests.csproj | 2 +- .../Volo.Abp.Authorization.Tests.csproj | 2 +- .../Volo.Abp.AutoMapper.Tests.csproj | 2 +- .../Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj | 2 +- .../Volo.Abp.BackgroundJobs.Tests.csproj | 2 +- .../Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj | 2 +- .../Volo.Abp.Castle.Core.Tests.csproj | 2 +- .../test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj | 2 +- .../test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj | 2 +- .../test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj | 2 +- .../Volo.Abp.Emailing.Tests.csproj | 2 +- .../Volo.Abp.EntityFrameworkCore.Tests.csproj | 4 ++-- .../Volo.Abp.EventBus.Tests.csproj | 2 +- .../Volo.Abp.Features.Tests.csproj | 2 +- .../Volo.Abp.FluentValidation.Tests.csproj | 2 +- .../Volo.Abp.Http.Client.Tests.csproj | 2 +- .../Volo.Abp.Localization.Tests.csproj | 2 +- .../Volo.Abp.MemoryDb.Tests.csproj | 2 +- .../Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj | 4 ++-- .../Volo.Abp.MultiTenancy.Tests.csproj | 2 +- .../Volo.Abp.Security.Tests.csproj | 2 +- .../Volo.Abp.Serialization.Tests.csproj | 2 +- .../Volo.Abp.Settings.Tests.csproj | 2 +- .../Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj | 2 +- framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj | 2 +- .../Volo.Abp.UI.Navigation.Tests.csproj | 2 +- .../test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj | 2 +- .../Volo.Abp.Validation.Tests.csproj | 2 +- .../Volo.Abp.VirtualFileSystem.Tests.csproj | 2 +- ...Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj | 2 +- .../Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj | 2 +- .../Volo.Abp.BackgroundJobs.DemoApp.csproj | 5 ++++- .../Volo.Abp.BackgroundJobs.Domain.Tests.csproj | 2 +- ...lo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj | 8 ++++---- .../Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj | 4 ++-- .../Volo.Abp.BackgroundJobs.TestBase.csproj | 4 ++-- .../Volo.Blogging.EntityFrameworkCore.Tests.csproj | 2 +- .../Volo.Docs.EntityFrameworkCore.Tests.csproj | 4 ++-- ...Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj | 4 ++-- .../Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj | 4 ++-- ...lo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj | 2 +- ....PermissionManagement.EntityFrameworkCore.Tests.csproj | 2 +- .../Volo.Abp.PermissionManagement.Tests.csproj | 2 +- ...Abp.SettingManagement.EntityFrameworkCore.Tests.csproj | 2 +- ....Abp.TenantManagement.EntityFrameworkCore.Tests.csproj | 4 ++-- .../Volo.Abp.Users.EntityFrameworkCore.Tests.csproj | 2 +- .../Acme.BookStore.Application.Tests.csproj | 2 +- .../ProductManagement.EntityFrameworkCore.Tests.csproj | 4 ++-- ...anyName.MyProjectName.EntityFrameworkCore.Tests.csproj | 4 ++-- .../MyCompanyName.MyProjectName.Application.Tests.csproj | 2 +- ...anyName.MyProjectName.EntityFrameworkCore.Tests.csproj | 4 ++-- 75 files changed, 98 insertions(+), 95 deletions(-) diff --git a/abp_io/src/Volo.AbpWebSite.Domain/Volo.AbpWebSite.Domain.csproj b/abp_io/src/Volo.AbpWebSite.Domain/Volo.AbpWebSite.Domain.csproj index b0c9926b35..78d1a7ac96 100644 --- a/abp_io/src/Volo.AbpWebSite.Domain/Volo.AbpWebSite.Domain.csproj +++ b/abp_io/src/Volo.AbpWebSite.Domain/Volo.AbpWebSite.Domain.csproj @@ -12,7 +12,7 @@ - + diff --git a/abp_io/src/Volo.Utils.SolutionTemplating/Volo.Utils.SolutionTemplating.csproj b/abp_io/src/Volo.Utils.SolutionTemplating/Volo.Utils.SolutionTemplating.csproj index 254d8b65c5..10004ae55e 100644 --- a/abp_io/src/Volo.Utils.SolutionTemplating/Volo.Utils.SolutionTemplating.csproj +++ b/abp_io/src/Volo.Utils.SolutionTemplating/Volo.Utils.SolutionTemplating.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj index e99572852e..4ee308e591 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj @@ -23,7 +23,7 @@ - + diff --git a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj index 37c728f175..fb85cbb3ec 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj +++ b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj @@ -29,7 +29,7 @@ - + diff --git a/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj b/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj index ae384414a3..029669c348 100644 --- a/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj +++ b/framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj @@ -18,7 +18,7 @@ - + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj index c8737bbfeb..3e68488105 100644 --- a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj +++ b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj index 71d48038e2..e5355a19c1 100644 --- a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj +++ b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj @@ -14,16 +14,16 @@ - + - + - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj index 5b33186509..2f5cdfb4fb 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj @@ -18,7 +18,7 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj index 65dda178a5..bfbf0cdf49 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj @@ -19,8 +19,8 @@ - - + + diff --git a/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj b/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj index 12084177a9..fe8a6a4192 100644 --- a/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj +++ b/framework/src/Volo.Abp.FluentValidation/Volo.Abp.FluentValidation.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj b/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj index e418ca03e5..e4b9db1c7b 100644 --- a/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj +++ b/framework/src/Volo.Abp.HangFire/Volo.Abp.HangFire.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj index d16fac5ba0..fcfff3fcb5 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj +++ b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj b/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj index 39b92cc428..8964f2f4fe 100644 --- a/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj +++ b/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj b/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj index b429defa2d..65ceed101e 100644 --- a/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj +++ b/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj @@ -18,7 +18,7 @@ - + diff --git a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj index f2f59a9a64..9492e6fbf3 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj +++ b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/AbpTestBase/AbpTestBase.csproj b/framework/test/AbpTestBase/AbpTestBase.csproj index 5e9761d304..4a25e99676 100644 --- a/framework/test/AbpTestBase/AbpTestBase.csproj +++ b/framework/test/AbpTestBase/AbpTestBase.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj index 1ca29422b9..806e426f82 100644 --- a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj index b7ba4ddd36..b0d3baaad9 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj index 551dfd9f2a..bd0a8c1ca0 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj @@ -21,7 +21,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj index 9d5b607bfd..a25b7d7d8f 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj @@ -20,7 +20,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj index 3b6d429dd0..dd5e36ed14 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj @@ -17,9 +17,9 @@ - - - + + + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj index 7ee7949c19..74c0285f34 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj index 7ffebd4224..d32284ed87 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj index 7ade7ea81b..9c7544a2f6 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj index 35b66f5bfe..cb099c5168 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj @@ -16,7 +16,7 @@ - + diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj index 160262de19..88925bb67d 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj @@ -16,7 +16,7 @@ - + diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj index 1f2757b34e..9eb89d4af9 100644 --- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj @@ -14,7 +14,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj index 26a16f83cc..c92d40f8be 100644 --- a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj +++ b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj @@ -15,7 +15,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj index 8c6a8170b8..7fa0474264 100644 --- a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj +++ b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj @@ -16,7 +16,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj index 49f5d2454a..2b4696092c 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj +++ b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj index c96b26d272..c5a45236c2 100644 --- a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj @@ -14,7 +14,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj index f043c10c13..bd58cb0d71 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj index 1cef1431c2..13c9cb2ef3 100644 --- a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj +++ b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj index ae203870fe..ad4141f96f 100644 --- a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj index 5083782360..32b4f25816 100644 --- a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj index 4162f8319b..3f32baa6aa 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj @@ -20,8 +20,8 @@ - - + + \ No newline at end of file diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj index dc8ab54f51..e810d5ef76 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj index 3632aa2bf3..ece1f124d5 100644 --- a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj +++ b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj @@ -16,7 +16,7 @@ - + diff --git a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj index ab2f82eefa..b0bc864896 100644 --- a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj +++ b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj index e0a8ea60de..4997863830 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj @@ -15,7 +15,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj index f5b87ab423..98a01e2fc7 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj +++ b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj index 0a61a38420..062cfaf730 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj @@ -16,7 +16,7 @@ - + \ No newline at end of file diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj index f2508f81ca..5ca5401bac 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj @@ -19,8 +19,8 @@ - - + + \ No newline at end of file diff --git a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj index 6b18627f7e..631ad1ed81 100644 --- a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj index 7fabca78ba..5339246c52 100644 --- a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj +++ b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj index a9fe791822..99db6083c2 100644 --- a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj +++ b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj index 7f83c36c9a..1e9bd3f4a0 100644 --- a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj +++ b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj @@ -16,7 +16,7 @@ - + diff --git a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj index e63096f8c4..3985910708 100644 --- a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj +++ b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj @@ -13,7 +13,7 @@ - + diff --git a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj index 243bd70a8c..0cb921f63a 100644 --- a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj +++ b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj @@ -17,7 +17,7 @@ - + diff --git a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj index b308eae3a2..10318fbf90 100644 --- a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj +++ b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj index 40575e7b1c..f3dede4b21 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj +++ b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj index 5891413963..60308b96ae 100644 --- a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj +++ b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj index 7f0be985bf..895b8231ce 100644 --- a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj +++ b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj index 247752f848..32ee40e070 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj index a080318e11..8134b0c512 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj @@ -6,7 +6,7 @@ - + diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj index c823e9a53a..3540aa8e9c 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj @@ -6,7 +6,10 @@ - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj index 07501ec85f..a8ff824305 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj index 6fad02af58..722d94f88e 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj index 00c9d6ffc2..f3fb433d10 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj index 9c9e420c65..1f4db1af41 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj index feb5448b1e..8f9b464a46 100644 --- a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj b/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj index 666c1e813f..71a466828b 100644 --- a/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj +++ b/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj index 27d7612baa..5566f756d8 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj index 8d4ce0c3fc..7a9219d556 100644 --- a/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj +++ b/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj @@ -22,8 +22,8 @@ - - + + diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj index faa5eb21aa..5a12ee07ed 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj @@ -20,7 +20,7 @@ - + diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj index ca64ea94f2..8285a006ed 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Tests.csproj index a0ba681b8d..f6846f3678 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Tests.csproj +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj index 43e0ceb087..53ff012ea6 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj index 6a43666860..85d334e610 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo.Abp.Users.EntityFrameworkCore.Tests.csproj b/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo.Abp.Users.EntityFrameworkCore.Tests.csproj index 8571a8bd34..1bbdc59392 100644 --- a/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo.Abp.Users.EntityFrameworkCore.Tests.csproj +++ b/modules/users/test/Volo.Abp.Users.EntityFrameworkCore.Tests/Volo.Abp.Users.EntityFrameworkCore.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/samples/BookStore/test/Acme.BookStore.Application.Tests/Acme.BookStore.Application.Tests.csproj b/samples/BookStore/test/Acme.BookStore.Application.Tests/Acme.BookStore.Application.Tests.csproj index 6813e17ee6..31415fb6c8 100644 --- a/samples/BookStore/test/Acme.BookStore.Application.Tests/Acme.BookStore.Application.Tests.csproj +++ b/samples/BookStore/test/Acme.BookStore.Application.Tests/Acme.BookStore.Application.Tests.csproj @@ -22,7 +22,7 @@ - + diff --git a/samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj b/samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj index d322f0e7b3..a5d1b1b349 100644 --- a/samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj +++ b/samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj b/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj index 495c869ba8..07fb1b020e 100644 --- a/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj +++ b/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj b/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj index 808ee9f1fe..2a05c9b871 100644 --- a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj +++ b/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj @@ -22,7 +22,7 @@ - + diff --git a/templates/service/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj b/templates/service/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj index 495c869ba8..07fb1b020e 100644 --- a/templates/service/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj +++ b/templates/service/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj @@ -15,8 +15,8 @@ - - + + From 5ba01578e67548ba4c89673999215d3afcc89a7e Mon Sep 17 00:00:00 2001 From: Dong Guo Date: Sun, 28 Apr 2019 10:51:59 +0800 Subject: [PATCH 043/335] add sqlite support --- framework/Volo.Abp.sln | 18 +++++++---- ...Volo.Abp.EntityFrameworkCore.Sqlite.csproj | 24 ++++++++++++++ ...extConfigurationContextSqliteExtensions.cs | 27 ++++++++++++++++ .../AbpDbContextOptionsSqliteExtensions.cs | 32 +++++++++++++++++++ .../AbpEntityFrameworkCoreSqliteModule.cs | 14 ++++++++ 5 files changed, 109 insertions(+), 6 deletions(-) create mode 100644 framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj create mode 100644 framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs create mode 100644 framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsSqliteExtensions.cs create mode 100644 framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index 10be5a757d..7987604e98 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -1,4 +1,3 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.28803.156 @@ -225,6 +224,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.FluentValidation", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.FluentValidation.Tests", "test\Volo.Abp.FluentValidation.Tests\Volo.Abp.FluentValidation.Tests.csproj", "{E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.EntityFrameworkCore.Sqlite", "src\Volo.Abp.EntityFrameworkCore.Sqlite\Volo.Abp.EntityFrameworkCore.Sqlite.csproj", "{58CF8957-5045-4F81-884D-72DF48F721CC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -655,6 +656,10 @@ Global {46C6336C-A1D8-4858-98CE-6F4C698C5A77}.Debug|Any CPU.Build.0 = Debug|Any CPU {46C6336C-A1D8-4858-98CE-6F4C698C5A77}.Release|Any CPU.ActiveCfg = Release|Any CPU {46C6336C-A1D8-4858-98CE-6F4C698C5A77}.Release|Any CPU.Build.0 = Release|Any CPU + {69168816-4394-4DDA-BB6B-C21983D37F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69168816-4394-4DDA-BB6B-C21983D37F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69168816-4394-4DDA-BB6B-C21983D37F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69168816-4394-4DDA-BB6B-C21983D37F0B}.Release|Any CPU.Build.0 = Release|Any CPU {43D5FE61-ECBF-4B16-AD95-0043E18EB93A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {43D5FE61-ECBF-4B16-AD95-0043E18EB93A}.Debug|Any CPU.Build.0 = Debug|Any CPU {43D5FE61-ECBF-4B16-AD95-0043E18EB93A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -663,10 +668,10 @@ Global {E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}.Debug|Any CPU.Build.0 = Debug|Any CPU {E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}.Release|Any CPU.ActiveCfg = Release|Any CPU {E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}.Release|Any CPU.Build.0 = Release|Any CPU - {69168816-4394-4DDA-BB6B-C21983D37F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69168816-4394-4DDA-BB6B-C21983D37F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69168816-4394-4DDA-BB6B-C21983D37F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69168816-4394-4DDA-BB6B-C21983D37F0B}.Release|Any CPU.Build.0 = Release|Any CPU + {58CF8957-5045-4F81-884D-72DF48F721CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58CF8957-5045-4F81-884D-72DF48F721CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58CF8957-5045-4F81-884D-72DF48F721CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58CF8957-5045-4F81-884D-72DF48F721CC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -778,9 +783,10 @@ Global {575BEFA1-19C2-49B1-8D31-B5D4472328DE} = {447C8A77-E5F0-4538-8687-7383196D04EA} {6C161F55-54B6-42A5-B177-3B0ED50323C1} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {46C6336C-A1D8-4858-98CE-6F4C698C5A77} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {69168816-4394-4DDA-BB6B-C21983D37F0B} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {43D5FE61-ECBF-4B16-AD95-0043E18EB93A} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {E9E1714F-7ED2-4BD1-BA4A-BA06E398288A} = {447C8A77-E5F0-4538-8687-7383196D04EA} - {69168816-4394-4DDA-BB6B-C21983D37F0B} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {58CF8957-5045-4F81-884D-72DF48F721CC} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj new file mode 100644 index 0000000000..cf6dad2b43 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj @@ -0,0 +1,24 @@ + + + + + + netstandard2.0 + Volo.Abp.EntityFrameworkCore.Sqlite + Volo.Abp.EntityFrameworkCore.Sqlite + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + + + + + + + + + + + + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs new file mode 100644 index 0000000000..cb531e2a44 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Text; +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Volo.Abp.EntityFrameworkCore.DependencyInjection; + +namespace Volo.Abp.EntityFrameworkCore +{ + public static class AbpDbContextConfigurationContextSqliteExtensions + { + public static DbContextOptionsBuilder UseSqlite( + [NotNull] this AbpDbContextConfigurationContext context, + [CanBeNull] Action sqliteOptionsAction = null) + { + if (context.ExistingConnection != null) + { + return context.DbContextOptions.UseSqlite(context.ExistingConnection, sqliteOptionsAction); + } + else + { + return context.DbContextOptions.UseSqlite(context.ConnectionString, sqliteOptionsAction); + } + } + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsSqliteExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsSqliteExtensions.cs new file mode 100644 index 0000000000..bf861539e9 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsSqliteExtensions.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Text; +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Infrastructure; + +namespace Volo.Abp.EntityFrameworkCore +{ + public static class AbpDbContextOptionsSqliteExtensions + { + public static void UseSqlite( + [NotNull] this AbpDbContextOptions options, + [CanBeNull] Action sqliteOptionsAction = null) + { + options.Configure(context => + { + context.UseSqlite(sqliteOptionsAction); + }); + } + + public static void UseSqlite( + [NotNull] this AbpDbContextOptions options, + [CanBeNull] Action sqliteOptionsAction = null) + where TDbContext : AbpDbContext + { + options.Configure(context => + { + context.UseSqlite(sqliteOptionsAction); + }); + } + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs new file mode 100644 index 0000000000..f6d8a0ada1 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EntityFrameworkCore.Sqlite +{ + [DependsOn( + typeof(AbpEntityFrameworkCoreModule) + )] + public class AbpEntityFrameworkCoreSqliteModule : AbpModule + { + } +} From 714da91ac6c3a7298f75fa3cdd6a1a50985a6d97 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 28 Apr 2019 12:37:00 +0800 Subject: [PATCH 044/335] Beautify the sqlite project code. --- .../AbpDbContextConfigurationContextSqliteExtensions.cs | 4 +--- .../AbpDbContextOptionsSqliteExtensions.cs | 4 +--- .../Sqlite/AbpEntityFrameworkCoreSqliteModule.cs | 6 ++---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs index cb531e2a44..6fd69fa42e 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs @@ -1,8 +1,6 @@ -using Microsoft.EntityFrameworkCore; using System; -using System.Collections.Generic; -using System.Text; using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Volo.Abp.EntityFrameworkCore.DependencyInjection; diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsSqliteExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsSqliteExtensions.cs index bf861539e9..68944194d1 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsSqliteExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsSqliteExtensions.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Infrastructure; diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs index f6d8a0ada1..8be6927e79 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/Sqlite/AbpEntityFrameworkCoreSqliteModule.cs @@ -1,14 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Text; using Volo.Abp.Modularity; namespace Volo.Abp.EntityFrameworkCore.Sqlite { [DependsOn( typeof(AbpEntityFrameworkCoreModule) - )] + )] public class AbpEntityFrameworkCoreSqliteModule : AbpModule { + } } From 5984528f0585fdd69439da2ae9212949448e0e22 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 28 Apr 2019 12:41:24 +0800 Subject: [PATCH 045/335] Add Sqlite project to common.ps1. --- nupkg/common.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index e83acaa57c..6ebae9a0b5 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -63,6 +63,7 @@ $projects = ( "framework/src/Volo.Abp.EntityFrameworkCore.SqlServer", "framework/src/Volo.Abp.EntityFrameworkCore.MySQL", "framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql", + "framework/src/Volo.Abp.EntityFrameworkCore.Sqlite", "framework/src/Volo.Abp.EventBus", "framework/src/Volo.Abp.EventBus.RabbitMQ", "framework/src/Volo.Abp.Features", From 3d06fa0a1571426fcd09069fbce793700bf9272f Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 28 Apr 2019 13:14:35 +0800 Subject: [PATCH 046/335] Undo the BookStore code change (0.17 not released) --- .../Permissions/BookStorePermissions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/BookStore/src/Acme.BookStore.Application/Permissions/BookStorePermissions.cs b/samples/BookStore/src/Acme.BookStore.Application/Permissions/BookStorePermissions.cs index ea8a26d6ef..b1ec575904 100644 --- a/samples/BookStore/src/Acme.BookStore.Application/Permissions/BookStorePermissions.cs +++ b/samples/BookStore/src/Acme.BookStore.Application/Permissions/BookStorePermissions.cs @@ -1,5 +1,4 @@ using System; -using Volo.Abp.Reflection; namespace Acme.BookStore.Permissions { @@ -13,7 +12,7 @@ namespace Acme.BookStore.Permissions public static string[] GetAll() { //Return an array of all permissions - return ReflectionHelper.GetPublicConstantsRecursively(typeof(BookStorePermissions)); + return Array.Empty(); } } } \ No newline at end of file From 13b70c1a58fd0eb0e66aabb59066e8c974dc148a Mon Sep 17 00:00:00 2001 From: cuibty Date: Sun, 28 Apr 2019 15:25:26 +0800 Subject: [PATCH 047/335] fix zh-Hans doc sample code --- docs/zh-Hans/Getting-Started-AspNetCore-Application.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/zh-Hans/Getting-Started-AspNetCore-Application.md b/docs/zh-Hans/Getting-Started-AspNetCore-Application.md index d0733bb140..f08af4744f 100644 --- a/docs/zh-Hans/Getting-Started-AspNetCore-Application.md +++ b/docs/zh-Hans/Getting-Started-AspNetCore-Application.md @@ -77,11 +77,11 @@ namespace BasicAspNetCoreApplication { public class Startup { - public IServiceProvider ConfigureServices(ServiceConfigurationContext context) + public IServiceProvider ConfigureServices(IServiceCollection services) { - context.Services.AddApplication(); + services.AddApplication(); - return context.Services.BuildServiceProviderFromFactory(); + return services.BuildServiceProviderFromFactory(); } public void Configure(IApplicationBuilder app) From 438e133f1d4faa6c1d5dd2e70e099a2306bf018d Mon Sep 17 00:00:00 2001 From: CdLian <970433771@qq.com> Date: Sun, 28 Apr 2019 15:55:40 +0800 Subject: [PATCH 048/335] Update Data-Transfer-Objects.md Fix spelling mistake. --- docs/zh-Hans/Best-Practices/Data-Transfer-Objects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh-Hans/Best-Practices/Data-Transfer-Objects.md b/docs/zh-Hans/Best-Practices/Data-Transfer-Objects.md index e0db48397e..0c6017e6e7 100644 --- a/docs/zh-Hans/Best-Practices/Data-Transfer-Objects.md +++ b/docs/zh-Hans/Best-Practices/Data-Transfer-Objects.md @@ -5,4 +5,4 @@ * **推荐** 定义 **public getter 和 setter** 的DTO成员 . * **推荐** 使用 **data annotations** **验证** service输入DTO的属性. * **不推荐** 在DTO中添加任何 **逻辑**, 在必要的时候可以实现 `IValidatableObject` 接口. -* **推荐** 为所有的DTO标记 **[Serializable]** Attribute. 因为它们已经是可序列化的, 开人发员可能会希望进行二进制序列化. \ No newline at end of file +* **推荐** 为所有的DTO标记 **[Serializable]** Attribute. 因为它们已经是可序列化的, 开发人员可能会希望进行二进制序列化. From f34a36d2f1b654d2d78626fa2f3faa9c034ee780 Mon Sep 17 00:00:00 2001 From: bbakermmc Date: Mon, 29 Apr 2019 14:48:28 -0400 Subject: [PATCH 049/335] Update abp.resourcemapping.js missing ; --- .../src/MyCompanyName.MyProjectName.Web/abp.resourcemapping.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.Web/abp.resourcemapping.js b/templates/mvc/src/MyCompanyName.MyProjectName.Web/abp.resourcemapping.js index 96f7c92778..122e8e926a 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.Web/abp.resourcemapping.js +++ b/templates/mvc/src/MyCompanyName.MyProjectName.Web/abp.resourcemapping.js @@ -5,4 +5,4 @@ mappings: { } -} \ No newline at end of file +}; From fc5ab383eec6d00d8168ab40bdefe27aafa16873 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Tue, 30 Apr 2019 10:07:00 +0300 Subject: [PATCH 050/335] Resolved #1079: Use static value instead of hard-coded MaxResultCount. --- .../Volo/Abp/Application/Dtos/LimitedResultRequestDto.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Dtos/LimitedResultRequestDto.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Dtos/LimitedResultRequestDto.cs index b3ed6a23cb..0931d090f3 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Dtos/LimitedResultRequestDto.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Dtos/LimitedResultRequestDto.cs @@ -9,7 +9,9 @@ namespace Volo.Abp.Application.Dtos [Serializable] public class LimitedResultRequestDto : ILimitedResultRequest { + public static int DefaultMaxResultCount { get; set; } = 10; + [Range(1, int.MaxValue)] - public virtual int MaxResultCount { get; set; } = 10; + public virtual int MaxResultCount { get; set; } = DefaultMaxResultCount; } } \ No newline at end of file From 6ba0ad6618e89f9f5c50cc4140d3f0b111abdd3a Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Tue, 30 Apr 2019 11:06:14 +0300 Subject: [PATCH 051/335] Resolved #1080: Ignore entities on EntityToEtoMapper for those don't implement IEntity. --- .../Entities/Events/Distributed/EntityEto.cs | 5 +- .../Events/Distributed/EntityToEtoMapper.cs | 7 +- .../Events/Distributed/IEntityToEtoMapper.cs | 5 +- .../Events/EntityChangeEventHelper.cs | 66 ++++++++++++++++--- 4 files changed, 68 insertions(+), 15 deletions(-) diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityEto.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityEto.cs index aa2a6e1c8f..d5f0a7dc2d 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityEto.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityEto.cs @@ -5,6 +5,8 @@ namespace Volo.Abp.Domain.Entities.Events.Distributed [Serializable] public class EntityEto : EtoBase { + public string EntityType { get; set; } + public string KeysAsString { get; set; } public EntityEto() @@ -12,8 +14,9 @@ namespace Volo.Abp.Domain.Entities.Events.Distributed } - public EntityEto(string keysAsString) + public EntityEto(string entityType, string keysAsString) { + EntityType = entityType; KeysAsString = keysAsString; } } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs index fd7cab1f4f..5b386599ef 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityToEtoMapper.cs @@ -1,6 +1,5 @@ -using System; +using Microsoft.Extensions.Options; using System.Collections.Generic; -using Microsoft.Extensions.Options; using Volo.Abp.DependencyInjection; using Volo.Abp.DynamicProxy; using Volo.Abp.EventBus.Distributed; @@ -28,7 +27,7 @@ namespace Volo.Abp.Domain.Entities.Events.Distributed var entity = entityObj as IEntity; if (entity == null) { - throw new ArgumentException($"{nameof(entityObj)} should be an entity and implement the '{typeof(IEntity).AssemblyQualifiedName}' interface!"); + return null; } var entityType = ProxyHelper.UnProxy(entity).GetType(); @@ -36,7 +35,7 @@ namespace Volo.Abp.Domain.Entities.Events.Distributed if (etoType == null) { var keys = entity.GetKeys().JoinAsString(","); - return new EntityEto(keys); + return new EntityEto(entityType.FullName, keys); } //TODO: Also add KeysAsString property to resulting json for compatibility with the EntityEto! diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IEntityToEtoMapper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IEntityToEtoMapper.cs index e33e6751e8..ceefb311ef 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IEntityToEtoMapper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IEntityToEtoMapper.cs @@ -1,7 +1,10 @@ -namespace Volo.Abp.Domain.Entities.Events.Distributed +using JetBrains.Annotations; + +namespace Volo.Abp.Domain.Entities.Events.Distributed { public interface IEntityToEtoMapper { + [CanBeNull] object Map(object entityObj); } } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs index dc4edea364..06554d451e 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs @@ -48,35 +48,83 @@ namespace Volo.Abp.Domain.Entities.Events public virtual async Task TriggerEntityCreatingEventAsync(object entity) { - await TriggerEventWithEntity(LocalEventBus, typeof(EntityCreatingEventData<>), entity, true); + await TriggerEventWithEntity( + LocalEventBus, + typeof(EntityCreatingEventData<>), + entity, + true + ); } public virtual async Task TriggerEntityCreatedEventOnUowCompletedAsync(object entity) { - await TriggerEventWithEntity(LocalEventBus, typeof(EntityCreatedEventData<>), entity, false); - await TriggerEventWithEntity(DistributedEventBus, typeof(EntityCreatedEto<>), EntityToEtoMapper.Map(entity), false); + await TriggerEventWithEntity( + LocalEventBus, + typeof(EntityCreatedEventData<>), + entity, + false + ); + + await TriggerEventWithEntity( + DistributedEventBus, + typeof(EntityCreatedEto<>), + EntityToEtoMapper.Map(entity), + false + ); } public virtual async Task TriggerEntityUpdatingEventAsync(object entity) { - await TriggerEventWithEntity(LocalEventBus, typeof(EntityUpdatingEventData<>), entity, true); + await TriggerEventWithEntity( + LocalEventBus, + typeof(EntityUpdatingEventData<>), + entity, + true + ); } public virtual async Task TriggerEntityUpdatedEventOnUowCompletedAsync(object entity) { - await TriggerEventWithEntity(LocalEventBus, typeof(EntityUpdatedEventData<>), entity, false); - await TriggerEventWithEntity(DistributedEventBus, typeof(EntityUpdatedEto<>), EntityToEtoMapper.Map(entity), false); + await TriggerEventWithEntity( + LocalEventBus, + typeof(EntityUpdatedEventData<>), + entity, + false + ); + + await TriggerEventWithEntity( + DistributedEventBus, + typeof(EntityUpdatedEto<>), + EntityToEtoMapper.Map(entity), + false + ); } public virtual async Task TriggerEntityDeletingEventAsync(object entity) { - await TriggerEventWithEntity(LocalEventBus, typeof(EntityDeletingEventData<>), entity, true); + await TriggerEventWithEntity( + LocalEventBus, + typeof(EntityDeletingEventData<>), + entity, + true + ); } public virtual async Task TriggerEntityDeletedEventOnUowCompletedAsync(object entity) { - await TriggerEventWithEntity(LocalEventBus, typeof(EntityDeletedEventData<>), entity, false); - await TriggerEventWithEntity(DistributedEventBus, typeof(EntityDeletedEto<>), EntityToEtoMapper.Map(entity), false); + await TriggerEventWithEntity( + LocalEventBus, + typeof(EntityDeletedEventData<>), + entity, + false + ); + + await TriggerEventWithEntity( + DistributedEventBus, + typeof(EntityDeletedEto<>), + EntityToEtoMapper.Map(entity), + false + ); } protected virtual async Task TriggerEventsInternalAsync(EntityChangeReport changeReport) From 230821750b7c54d296652f2f9d962efa63791281 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Tue, 30 Apr 2019 11:19:09 +0300 Subject: [PATCH 052/335] Check for null. --- .../Events/EntityChangeEventHelper.cs | 48 ++++++++++++------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs index 06554d451e..c9219feffc 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs @@ -65,12 +65,16 @@ namespace Volo.Abp.Domain.Entities.Events false ); - await TriggerEventWithEntity( - DistributedEventBus, - typeof(EntityCreatedEto<>), - EntityToEtoMapper.Map(entity), - false - ); + var eto = EntityToEtoMapper.Map(entity); + if (eto != null) + { + await TriggerEventWithEntity( + DistributedEventBus, + typeof(EntityCreatedEto<>), + eto, + false + ); + } } public virtual async Task TriggerEntityUpdatingEventAsync(object entity) @@ -92,12 +96,16 @@ namespace Volo.Abp.Domain.Entities.Events false ); - await TriggerEventWithEntity( - DistributedEventBus, - typeof(EntityUpdatedEto<>), - EntityToEtoMapper.Map(entity), - false - ); + var eto = EntityToEtoMapper.Map(entity); + if (eto != null) + { + await TriggerEventWithEntity( + DistributedEventBus, + typeof(EntityUpdatedEto<>), + eto, + false + ); + } } public virtual async Task TriggerEntityDeletingEventAsync(object entity) @@ -119,12 +127,16 @@ namespace Volo.Abp.Domain.Entities.Events false ); - await TriggerEventWithEntity( - DistributedEventBus, - typeof(EntityDeletedEto<>), - EntityToEtoMapper.Map(entity), - false - ); + var eto = EntityToEtoMapper.Map(entity); + if (eto != null) + { + await TriggerEventWithEntity( + DistributedEventBus, + typeof(EntityDeletedEto<>), + EntityToEtoMapper.Map(entity), + false + ); + } } protected virtual async Task TriggerEventsInternalAsync(EntityChangeReport changeReport) From e45caa5b7fee096a76ad61ac04b8edae67003e21 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 09:11:08 +0300 Subject: [PATCH 053/335] Create Volo.Abp.Cli.Core package. --- framework/Volo.Abp.sln | 9 ++++++- .../Volo.Abp.Cli.Core.csproj | 25 +++++++++++++++++++ .../Volo/Abp/Cli/AbpCliCoreModule.cs | 15 +++++++++++ .../Volo/Abp/Cli/Args/CommandLineArgs.cs | 0 .../Abp/Cli/Args/CommandLineArgumentParser.cs | 0 .../Volo/Abp/Cli/Args/CommandLineOptions.cs | 0 .../Cli/Args/ICommandLineArgumentParser.cs | 0 .../Volo/Abp/Cli/CliService.cs | 1 - .../Volo/Abp/Cli/Commands/CommandSelector.cs | 0 .../Volo/Abp/Cli/Commands/ICommandSelector.cs | 0 .../Volo/Abp/Cli/Commands/IConsoleCommand.cs | 0 .../Volo/Abp/Cli/Commands/MainHelpCommand.cs | 0 .../Abp/Cli/Commands/NewProjectCommand.cs | 0 .../Building/DatabaseProvider.cs | 0 .../Building/GithubRepositoryInfo.cs | 0 .../Building/ProjectBuildContext.cs | 0 .../Building/ProjectBuildContextExtensions.cs | 0 .../Building/ProjectBuildPipeline.cs | 0 .../Building/ProjectBuildPipelineBuilder.cs | 0 .../Building/ProjectBuildPipelineStep.cs | 0 .../Building/ProjectBuildRequest.cs | 0 .../Building/ProjectResult.cs | 0 .../Steps/CreateProjectResultZipStep.cs | 0 .../Building/Steps/FileEntryListReadStep.cs | 0 .../Building/Steps/GithubDownloadStep.cs | 0 .../Steps/NugetReferenceReplaceStep.cs | 0 .../Steps/RemoveProjectFromSolutionStep.cs | 0 .../Building/Steps/SolutionRenameStep.cs | 0 .../SwitchEntityFrameworkCoreToMongoDbStep.cs | 0 .../Building/Steps/TemplateCodeDeleteStep.cs | 0 .../Building/TemplateInfo.cs | 0 .../Abp/SolutionTemplating/DownloadInfo.cs | 0 .../Abp/SolutionTemplating/Files/FileEntry.cs | 0 .../Files/FileEntryExtensions.cs | 0 .../SolutionTemplating/Files/FileEntryList.cs | 0 .../Files/FileEntryListExtensions.cs | 0 .../Github/GithubManager.cs | 0 .../Github/GithubRelease.cs | 0 .../SolutionTemplating/SolutionBuildResult.cs | 0 .../Abp/SolutionTemplating/SolutionBuilder.cs | 0 .../Abp/SolutionTemplating/SolutionName.cs | 0 .../SolutionTemplating/StandardVersions.cs | 0 .../Zipping/ZipFileExtensions.cs | 0 .../src/Volo.Abp.Cli/Volo.Abp.Cli.csproj | 9 +------ .../Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs | 5 ++-- .../Volo.Abp.Cli.Tests.csproj | 2 +- nupkg/common.ps1 | 1 + 47 files changed, 53 insertions(+), 14 deletions(-) create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/Args/CommandLineArgs.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/Args/CommandLineArgumentParser.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/Args/CommandLineOptions.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/Args/ICommandLineArgumentParser.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/CliService.cs (98%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/Commands/CommandSelector.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/Commands/ICommandSelector.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/Commands/IConsoleCommand.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/Commands/MainHelpCommand.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/Cli/Commands/NewProjectCommand.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/Steps/RemoveProjectFromSolutionStep.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/DownloadInfo.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Files/FileEntry.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Github/GithubManager.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/SolutionBuilder.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/SolutionName.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/StandardVersions.cs (100%) rename framework/src/{Volo.Abp.Cli => Volo.Abp.Cli.Core}/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs (100%) diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index e1af7720f9..41eb7f1aeb 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -224,10 +224,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FluentValidation", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FluentValidation.Tests", "test\Volo.Abp.FluentValidation.Tests\Volo.Abp.FluentValidation.Tests.csproj", "{E9E1714F-7ED2-4BD1-BA4A-BA06E398288A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Cli.Tests", "test\Volo.Abp.Cli.Tests\Volo.Abp.Cli.Tests.csproj", "{92B70EFF-C1B1-4D1D-8BCE-D116908FC6FF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Cli.Tests", "test\Volo.Abp.Cli.Tests\Volo.Abp.Cli.Tests.csproj", "{92B70EFF-C1B1-4D1D-8BCE-D116908FC6FF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.EntityFrameworkCore.Sqlite", "src\Volo.Abp.EntityFrameworkCore.Sqlite\Volo.Abp.EntityFrameworkCore.Sqlite.csproj", "{58CF8957-5045-4F81-884D-72DF48F721CC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Cli.Core", "src\Volo.Abp.Cli.Core\Volo.Abp.Cli.Core.csproj", "{3DA9923E-048E-4FE7-9748-3A0194F5D196}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -678,6 +680,10 @@ Global {58CF8957-5045-4F81-884D-72DF48F721CC}.Debug|Any CPU.Build.0 = Debug|Any CPU {58CF8957-5045-4F81-884D-72DF48F721CC}.Release|Any CPU.ActiveCfg = Release|Any CPU {58CF8957-5045-4F81-884D-72DF48F721CC}.Release|Any CPU.Build.0 = Release|Any CPU + {3DA9923E-048E-4FE7-9748-3A0194F5D196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3DA9923E-048E-4FE7-9748-3A0194F5D196}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3DA9923E-048E-4FE7-9748-3A0194F5D196}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3DA9923E-048E-4FE7-9748-3A0194F5D196}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -794,6 +800,7 @@ Global {E9E1714F-7ED2-4BD1-BA4A-BA06E398288A} = {447C8A77-E5F0-4538-8687-7383196D04EA} {92B70EFF-C1B1-4D1D-8BCE-D116908FC6FF} = {447C8A77-E5F0-4538-8687-7383196D04EA} {58CF8957-5045-4F81-884D-72DF48F721CC} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {3DA9923E-048E-4FE7-9748-3A0194F5D196} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj new file mode 100644 index 0000000000..459d95089a --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -0,0 +1,25 @@ + + + + + + netstandard2.0 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs new file mode 100644 index 0000000000..e56c95ff27 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Domain; +using Volo.Abp.Json; +using Volo.Abp.Modularity; + +namespace Volo.Abp.Cli +{ + [DependsOn( + typeof(AbpDddDomainModule), + typeof(AbpJsonModule) + )] + public class AbpCliCoreModule : AbpModule + { + + } +} diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgs.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgumentParser.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgumentParser.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineArgumentParser.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgumentParser.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineOptions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/CommandLineOptions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/ICommandLineArgumentParser.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/ICommandLineArgumentParser.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Args/ICommandLineArgumentParser.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/ICommandLineArgumentParser.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs similarity index 98% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs index d76216b300..50108567e6 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.DependencyInjection; -using System; using System.Threading.Tasks; using Volo.Abp.Cli.Args; using Volo.Abp.Cli.Commands; diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/CommandSelector.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ICommandSelector.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/ICommandSelector.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ICommandSelector.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/IConsoleCommand.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/IConsoleCommand.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/IConsoleCommand.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/MainHelpCommand.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/MainHelpCommand.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/MainHelpCommand.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Commands/NewProjectCommand.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/RemoveProjectFromSolutionStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/RemoveProjectFromSolutionStep.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/RemoveProjectFromSolutionStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/RemoveProjectFromSolutionStep.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/DownloadInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/DownloadInfo.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/DownloadInfo.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/DownloadInfo.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntry.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntry.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntry.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntry.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubManager.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubManager.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubManager.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubManager.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuilder.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionBuilder.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuilder.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionName.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionName.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/SolutionName.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionName.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/StandardVersions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/StandardVersions.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/StandardVersions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/StandardVersions.cs diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.Cli/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs diff --git a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj index fb8b3b9e19..f2f9424512 100644 --- a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj +++ b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj @@ -11,14 +11,7 @@ - - - - - - - - + diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs index 0b891e1299..523dd6c813 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs @@ -1,10 +1,9 @@ -using Volo.Abp.Domain; -using Volo.Abp.Modularity; +using Volo.Abp.Modularity; namespace Volo.Abp.Cli { [DependsOn( - typeof(AbpDddDomainModule) + typeof(AbpCliCoreModule) )] public class AbpCliModule : AbpModule { diff --git a/framework/test/Volo.Abp.Cli.Tests/Volo.Abp.Cli.Tests.csproj b/framework/test/Volo.Abp.Cli.Tests/Volo.Abp.Cli.Tests.csproj index 915cb58607..3f094594d0 100644 --- a/framework/test/Volo.Abp.Cli.Tests/Volo.Abp.Cli.Tests.csproj +++ b/framework/test/Volo.Abp.Cli.Tests/Volo.Abp.Cli.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 6ebae9a0b5..100bfe3b89 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -53,6 +53,7 @@ $projects = ( "framework/src/Volo.Abp.BackgroundWorkers", "framework/src/Volo.Abp.Caching", "framework/src/Volo.Abp.Castle.Core", + "framework/src/Volo.Abp.Cli.Core", "framework/src/Volo.Abp.Cli", "framework/src/Volo.Abp.Core", "framework/src/Volo.Abp.Data", From 9cd2f241026fad2634f8db03b90717d550f7af92 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 12:04:24 +0300 Subject: [PATCH 054/335] New project creation for CLI --- .../Volo/Abp/Cli/Args/CommandLineOptions.cs | 28 +++++- .../Abp/Cli/Commands/NewProjectCommand.cs | 68 +++++++++++--- .../Abp/ProjectBuilding/AbpIoTemplateStore.cs | 16 ++++ .../Abp/ProjectBuilding/IProjectBuilder.cs | 10 ++ .../ProjectBuilding/ITemplateInfoProvider.cs | 11 +++ .../Abp/ProjectBuilding/ITemplateStore.cs | 9 ++ .../Abp/ProjectBuilding/ProjectBuildArgs.cs | 27 ++++++ .../Abp/ProjectBuilding/ProjectBuilder.cs | 52 ++++++++++ .../Volo/Abp/ProjectBuilding/TemplateFile.cs | 12 +++ .../ProjectBuilding/TemplateInfoProvider.cs | 48 ++++++++++ .../Templates/MvcApplicationTemplate.cs | 41 ++++++++ .../Templates/MvcModuleTemplate.cs | 9 ++ .../Templates/ServiceTemplate.cs | 9 ++ .../Building/DatabaseProvider.cs | 4 +- .../Building/ProjectBuildContext.cs | 25 +++-- .../Building/ProjectBuildPipelineBuilder.cs | 1 - .../Building/ProjectBuildRequest.cs | 23 ----- .../Building/Steps/FileEntryListReadStep.cs | 34 +------ .../Building/Steps/GithubDownloadStep.cs | 33 ------- .../Steps/NugetReferenceReplaceStep.cs | 2 +- .../Building/Steps/SolutionRenameStep.cs | 4 +- .../Building/TemplateInfo.cs | 18 ---- .../Github/GithubManager.cs | 94 ------------------- ...onBuildResult.cs => ProjectBuildResult.cs} | 4 +- .../Abp/SolutionTemplating/SolutionBuilder.cs | 64 ------------- 25 files changed, 351 insertions(+), 295 deletions(-) create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/IProjectBuilder.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateInfoProvider.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateStore.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateFile.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs delete mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs delete mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs delete mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubManager.cs rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/{SolutionBuildResult.cs => ProjectBuildResult.cs} (68%) delete mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuilder.cs diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs index 93f23fdd76..3e72d6e434 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineOptions.cs @@ -1,9 +1,35 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using JetBrains.Annotations; namespace Volo.Abp.Cli.Args { public class CommandLineOptions : Dictionary { + [CanBeNull] + public string GetOrNull([NotNull] string name, params string[] alternativeNames) + { + Check.NotNullOrWhiteSpace(name, nameof(name)); + var value = this.GetOrDefault(name); + if (!value.IsNullOrWhiteSpace()) + { + return value; + } + + if (!alternativeNames.IsNullOrEmpty()) + { + foreach (var alternativeName in alternativeNames) + { + value = this.GetOrDefault(alternativeName); + if (!value.IsNullOrWhiteSpace()) + { + return value; + } + } + } + + return null; + } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs index b3051ea700..b662bec85b 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -1,43 +1,85 @@ using System; +using System.IO; using System.Threading.Tasks; +using Ionic.Zip; using Volo.Abp.Cli.Args; using Volo.Abp.DependencyInjection; +using Volo.Abp.ProjectBuilding; using Volo.Abp.SolutionTemplating; using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.SolutionTemplating.Zipping; namespace Volo.Abp.Cli.Commands { public class NewProjectCommand : IConsoleCommand, ITransientDependency { - protected SolutionBuilder SolutionBuilder { get; } + protected ProjectBuilder ProjectBuilder { get; } - public NewProjectCommand(SolutionBuilder solutionBuilder) + public NewProjectCommand(ProjectBuilder projectBuilder) { - SolutionBuilder = solutionBuilder; + ProjectBuilder = projectBuilder; } public async Task ExecuteAsync(CommandLineArgs commandLineArgs) { if (commandLineArgs.Target == null) { - Console.WriteLine("Solution name is missing."); + Console.WriteLine("Project name is missing."); Console.WriteLine("Usage:"); - Console.WriteLine(" abp new "); - Console.WriteLine("Example:"); + Console.WriteLine(" abp new [-t ]"); + Console.WriteLine("Examples:"); Console.WriteLine(" abp new Acme.BookStore"); + Console.WriteLine(" abp new Acme.BookStore mvc"); return; } Console.WriteLine("Creating a new solution"); Console.WriteLine("Solution name: " + commandLineArgs.Target); - //await SolutionBuilder.BuildAsync( - // null, - // commandLineArgs.Target, - // DatabaseProvider.EntityFrameworkCore, - // "...", - // true - //); + var result = await ProjectBuilder.BuildAsync( + new ProjectBuildArgs( + SolutionName.Parse(commandLineArgs.Target), + GetDatabaseProviderOrNull(commandLineArgs), + commandLineArgs.Options.GetOrNull(Options.Template.Short, Options.Template.Long) + ) + ); + + using (var templateFileStream = new MemoryStream(result.ZipContent)) + { + using (var templateZipFile = ZipFile.Read(templateFileStream)) + { + templateZipFile.ExtractAll(Directory.GetCurrentDirectory(), ExtractExistingFileAction.Throw); + } + } + } + + protected virtual DatabaseProvider GetDatabaseProviderOrNull(CommandLineArgs commandLineArgs) + { + var optionValue = commandLineArgs.Options.GetOrNull(Options.DatabaseProvider.Short, Options.DatabaseProvider.Long); + switch (optionValue) + { + case "ef": + return DatabaseProvider.EntityFrameworkCore; + case "mongodb": + return DatabaseProvider.MongoDb; + default: + return DatabaseProvider.NotSpecified; + } + } + + public static class Options + { + public static class Template + { + public const string Short = "t"; + public const string Long = "template"; + } + + public static class DatabaseProvider + { + public const string Short = "d"; + public const string Long = "databaseProvider"; + } } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs new file mode 100644 index 0000000000..c8c36b967d --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs @@ -0,0 +1,16 @@ +using System.IO; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.ProjectBuilding +{ + public class AbpIoTemplateStore : ITemplateStore, ITransientDependency + { + public async Task GetAsync(string templateName, string version) + { + return new TemplateFile( + File.ReadAllBytes("C:\\Temp\\abp-templates\\" + version + "\\" + templateName + ".zip") + ); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/IProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/IProjectBuilder.cs new file mode 100644 index 0000000000..3011516061 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/IProjectBuilder.cs @@ -0,0 +1,10 @@ +using System.Threading.Tasks; +using Volo.Abp.SolutionTemplating; + +namespace Volo.Abp.ProjectBuilding +{ + public interface IProjectBuilder + { + Task BuildAsync(ProjectBuildArgs args); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateInfoProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateInfoProvider.cs new file mode 100644 index 0000000000..ad8dbbe874 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateInfoProvider.cs @@ -0,0 +1,11 @@ +using Volo.Abp.SolutionTemplating.Building; + +namespace Volo.Abp.ProjectBuilding +{ + public interface ITemplateInfoProvider + { + TemplateInfo GetDefault(); + + TemplateInfo Get(string name); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateStore.cs new file mode 100644 index 0000000000..f09faa8603 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateStore.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace Volo.Abp.ProjectBuilding +{ + public interface ITemplateStore + { + Task GetAsync(string templateInfoName, string version); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs new file mode 100644 index 0000000000..5ca1a0ad99 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs @@ -0,0 +1,27 @@ +using JetBrains.Annotations; +using Volo.Abp.SolutionTemplating; +using Volo.Abp.SolutionTemplating.Building; + +namespace Volo.Abp.ProjectBuilding +{ + public class ProjectBuildArgs + { + [NotNull] + public SolutionName SolutionName { get; } + + [CanBeNull] + public string TemplateName { get; set; } + + public DatabaseProvider DatabaseProvider { get; } + + public ProjectBuildArgs( + [NotNull] SolutionName solutionName, + DatabaseProvider databaseProvider = DatabaseProvider.NotSpecified, + [CanBeNull] string templateName = null) + { + DatabaseProvider = databaseProvider; + TemplateName = templateName; + SolutionName = Check.NotNull(solutionName, nameof(solutionName)); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs new file mode 100644 index 0000000000..ee13db6e3f --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs @@ -0,0 +1,52 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.SolutionTemplating; +using Volo.Abp.SolutionTemplating.Building; + +namespace Volo.Abp.ProjectBuilding +{ + public class ProjectBuilder : IProjectBuilder, ITransientDependency + { + protected ITemplateStore TemplateStore { get; } + protected ITemplateInfoProvider TemplateInfoProvider { get; } + + public ProjectBuilder(ITemplateStore templateStore, ITemplateInfoProvider templateInfoProvider) + { + TemplateStore = templateStore; + TemplateInfoProvider = templateInfoProvider; + } + + public async Task BuildAsync(ProjectBuildArgs args) + { + var version = "0.16.0"; //TODO: Should get from somewhere! + + var templateInfo = GetTemplateInfo(args); + + var templateFile = await TemplateStore.GetAsync(args.TemplateName, version); + + var context = new ProjectBuildContext( + templateInfo, + templateFile, + args, + version + ); + + ProjectBuildPipelineBuilder.Build(context).Execute(context); + + return new ProjectBuildResult(context.Result.ZipContent, args.SolutionName.ProjectName); + } + + private TemplateInfo GetTemplateInfo(ProjectBuildArgs args) + { + if (args.TemplateName.IsNullOrWhiteSpace()) + { + return TemplateInfoProvider.GetDefault(); + } + else + { + return TemplateInfoProvider.Get(args.TemplateName); + } + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateFile.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateFile.cs new file mode 100644 index 0000000000..d1f839e27b --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateFile.cs @@ -0,0 +1,12 @@ +namespace Volo.Abp.ProjectBuilding +{ + public class TemplateFile + { + public byte[] FileBytes { get; } + + public TemplateFile(byte[] fileBytes) + { + FileBytes = fileBytes; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs new file mode 100644 index 0000000000..d65937eab2 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs @@ -0,0 +1,48 @@ +using System; +using Volo.Abp.DependencyInjection; +using Volo.Abp.ProjectBuilding.Templates; +using Volo.Abp.SolutionTemplating.Building; + +namespace Volo.Abp.ProjectBuilding +{ + public class TemplateInfoProvider : ITemplateInfoProvider, ITransientDependency + { + public TemplateInfo GetDefault() + { + return Get(TemplateNames.Mvc); + } + + public TemplateInfo Get(string name) + { + switch (name) + { + case TemplateNames.Mvc: + return new MvcApplicationTemplate(); + case TemplateNames.MvcModule: + return new MvcModuleTemplate(); + case TemplateNames.Service: + return new ServiceTemplate(); + default: + throw new Exception("There is no template found with given name: " + name); + } + } + + public static class TemplateNames + { + /// + /// "mvc". + /// + public const string Mvc = "mvc"; + + /// + /// "mvcmodule". + /// + public const string MvcModule = "mvcmodule"; + + /// + /// "service". + /// + public const string Service = "service"; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs new file mode 100644 index 0000000000..7fe2fd7a0a --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; +using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.SolutionTemplating.Building.Steps; + +namespace Volo.Abp.ProjectBuilding.Templates +{ + public class MvcApplicationTemplate : TemplateInfo + { + public override IEnumerable GetCustomSteps(ProjectBuildContext context) + { + var steps = new List(); + SwitchDatabaseProvider(context, steps); + RemoveOtherDatabaseProviders(context, steps); + return steps; + } + + private static void SwitchDatabaseProvider(ProjectBuildContext context, List steps) + { + if (context.BuildArgs.DatabaseProvider == DatabaseProvider.MongoDb) + { + steps.Add(new SwitchEntityFrameworkCoreToMongoDbStep()); + } + } + + private static void RemoveOtherDatabaseProviders(ProjectBuildContext context, List steps) + { + if (context.BuildArgs.DatabaseProvider != DatabaseProvider.EntityFrameworkCore) + { + steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.EntityFrameworkCore")); + steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations")); + steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Application.Tests", projectFolderPath: "test/MyCompanyName.MyProjectName.Application.Tests")); + steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Web.Tests", projectFolderPath: "test/MyCompanyName.MyProjectName.Web.Tests")); + } + + if (context.BuildArgs.DatabaseProvider != DatabaseProvider.MongoDb) + { + steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.MongoDB")); + } + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs new file mode 100644 index 0000000000..6549ce103c --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs @@ -0,0 +1,9 @@ +using Volo.Abp.SolutionTemplating.Building; + +namespace Volo.Abp.ProjectBuilding.Templates +{ + public class MvcModuleTemplate : TemplateInfo + { + + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs new file mode 100644 index 0000000000..7558891d34 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs @@ -0,0 +1,9 @@ +using Volo.Abp.SolutionTemplating.Building; + +namespace Volo.Abp.ProjectBuilding.Templates +{ + public class ServiceTemplate : TemplateInfo + { + + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs index 1e2e4efc00..e0e0f14e0b 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs @@ -1,8 +1,8 @@ namespace Volo.Abp.SolutionTemplating.Building { - public enum DatabaseProvider : byte + public enum DatabaseProvider { - Irrelevant = 0, + NotSpecified = 0, EntityFrameworkCore = 1, MongoDb = 2 } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs index 297e7f056f..b620f6dc02 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs @@ -1,28 +1,37 @@ using JetBrains.Annotations; +using Volo.Abp.ProjectBuilding; using Volo.Abp.SolutionTemplating.Files; namespace Volo.Abp.SolutionTemplating.Building { public class ProjectBuildContext { - public ProjectBuildRequest Request { get; } + [NotNull] + public TemplateFile TemplateFile { get; } - public string TemplatesFolder { get; } + [NotNull] + public string Version { get; } + [NotNull] + public ProjectBuildArgs BuildArgs { get; } + + [NotNull] public TemplateInfo Template { get; } public FileEntryList Files { get; set; } public ProjectResult Result { get; set; } - public ProjectBuildContext( - [NotNull] TemplateInfo template, - ProjectBuildRequest request, - string templatesFolder) + public ProjectBuildContext([NotNull] TemplateInfo template, + [NotNull] TemplateFile templateFile, + [NotNull] ProjectBuildArgs buildArgs, + [NotNull] string version) { Template = Check.NotNull(template, nameof(template)); - Request = request; - TemplatesFolder = templatesFolder; + TemplateFile = Check.NotNull(templateFile, nameof(templateFile)); + BuildArgs = Check.NotNull(buildArgs, nameof(buildArgs)); + Version = Check.NotNullOrWhiteSpace(version, nameof(version)); + Result = new ProjectResult(); } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs index 41d760e4df..44062f9cee 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs @@ -8,7 +8,6 @@ namespace Volo.Abp.SolutionTemplating.Building { var pipeline = new ProjectBuildPipeline(); - pipeline.Steps.Add(new GithubDownloadStep()); pipeline.Steps.Add(new FileEntryListReadStep()); pipeline.Steps.AddRange(context.Template.GetCustomSteps(context)); pipeline.Steps.Add(new NugetReferenceReplaceStep()); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs deleted file mode 100644 index 4f4bec11b8..0000000000 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildRequest.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace Volo.Abp.SolutionTemplating.Building -{ - public class ProjectBuildRequest - { - public SolutionName SolutionName { get; } - - public DatabaseProvider DatabaseProvider { get; } - - public string Version { get; } - - public bool ReplaceLocalReferencesToNuget { get; set; } - - public ProjectBuildRequest( - SolutionName solutionName, - DatabaseProvider databaseProvider, - string version) - { - SolutionName = solutionName; - DatabaseProvider = databaseProvider; - Version = version; - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs index 62ec0d9f66..d1433725ec 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs @@ -9,25 +9,7 @@ namespace Volo.Abp.SolutionTemplating.Building.Steps { public override void Execute(ProjectBuildContext context) { - if (context.Template.RootPathInZipFile == null) - { - context.Files = GetEntriesFromZipFile(context.Template.FilePath); - return; - } - - var entryListCachePath = CreateCachePath(context); - - if (File.Exists(entryListCachePath)) - { - context.Files = GetEntriesFromZipFile(entryListCachePath); - return; - } - - context.Files = GetEntriesFromZipFile( - context.Template.FilePath, - context.Template.RootPathInZipFile); - - SaveCachedEntries(entryListCachePath, context.Files); + context.Files = GetEntriesFromZipFile(context.Template.FilePath); } private static FileEntryList GetEntriesFromZipFile(string filePath, string rootFolder = null) @@ -40,19 +22,5 @@ namespace Volo.Abp.SolutionTemplating.Building.Steps } } } - - private static void SaveCachedEntries(string filePath, FileEntryList entries) - { - using (var resultZipFile = new ZipFile()) - { - entries.CopyToZipFile(resultZipFile); - resultZipFile.Save(filePath); - } - } - - private string CreateCachePath(ProjectBuildContext context) - { - return context.Template.FilePath.Replace(".zip", "-filtered.zip"); - } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs deleted file mode 100644 index d34c67ec66..0000000000 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/GithubDownloadStep.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.IO; -using Volo.Abp.SolutionTemplating.Github; - -namespace Volo.Abp.SolutionTemplating.Building.Steps -{ - public class GithubDownloadStep : ProjectBuildPipelineStep - { - public override void Execute(ProjectBuildContext context) - { - var githubManager = new GithubManager(); - - context.Template.Version = githubManager.GetVersion(context); - - context.Template.FilePath = Path.Combine( - context.TemplatesFolder, - $"{context.Template.Name}-{context.Template.Version}.zip" - ); - - context.Template.RootPathInZipFile = context.Template.GithubRepository.RepositoryName + "-" + context.Template.Version.RemovePreFix("v") + context.Template.RootPathInZipFile; - - try - { - githubManager.DownloadIfNotExist(context); - } - catch (Exception e) - { - throw e; //TODO: !!! - //var existingVersion = githubManager.GetExistingVersion(context); - } - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs index 7336dbd397..460e174252 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.SolutionTemplating.Building.Steps context.Files, "MyCompanyName", "MyProjectName", - context.Template.Version + context.Version ).Run(); } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs index a45fabfd5b..43d7356a32 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs @@ -13,8 +13,8 @@ namespace Volo.Abp.SolutionTemplating.Building.Steps context.Files, "MyCompanyName", "MyProjectName", - context.Request.SolutionName.CompanyName, - context.Request.SolutionName.ProjectName + context.BuildArgs.SolutionName.CompanyName, + context.BuildArgs.SolutionName.ProjectName ).Run(); } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs index 0bdccd3d00..1756402664 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs @@ -5,26 +5,8 @@ namespace Volo.Abp.SolutionTemplating.Building { public abstract class TemplateInfo { - public string Name { get; set; } - - public GithubRepositoryInfo GithubRepository { get; } - public string FilePath { get; set; } - public string RootPathInZipFile { get; set; } - - public string Version { get; set; } - - protected TemplateInfo( - string name, - GithubRepositoryInfo githubRepository, - string rootPathInZipFile) - { - Name = name; - GithubRepository = githubRepository; - RootPathInZipFile = rootPathInZipFile; - } - public virtual IEnumerable GetCustomSteps(ProjectBuildContext context) { return Array.Empty(); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubManager.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubManager.cs deleted file mode 100644 index fbe0801ffd..0000000000 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubManager.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using Newtonsoft.Json; -using Volo.Abp.SolutionTemplating.Building; -using Volo.Abp.Threading; - -namespace Volo.Abp.SolutionTemplating.Github -{ - public class GithubManager - { - private static readonly object LockObject = new object(); - - public string GetVersion(ProjectBuildContext context) - { - if (context.Request.Version.StartsWith("Branch:", StringComparison.OrdinalIgnoreCase)) - { - //TODO: Should not cache branch files! - return context.Request.Version.Substring("Branch:".Length); - } - - var url = "https://api.github.com/repos/" + context.Template.GithubRepository.RepositoryNameWithOrganization + "/releases"; - - using (var client = new System.Net.Http.HttpClient()) - { - var credentials = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}:", context.Template.GithubRepository.AccessToken); - credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials)); - - client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials); - client.Timeout = TimeSpan.FromMinutes(30); - - client.DefaultRequestHeaders.UserAgent.ParseAdd("MyAgent/1.0"); - var releases = JsonConvert.DeserializeObject>(client.GetStringAsync(url).Result); - - if (context.Request.Version == StandardVersions.LatestUnstable) - { - return releases.FirstOrDefault(r => !r.IsPrerelease)?.Name; - } - - return releases.FirstOrDefault()?.Name; - } - } - - public void DownloadIfNotExist(ProjectBuildContext context) - { - using (var client = new System.Net.Http.HttpClient()) - { - if (File.Exists(context.Template.FilePath)) - { - return; - } - - lock (LockObject) - { - if (File.Exists(context.Template.FilePath)) - { - return; - } - - var downloadUrl = "https://github.com/" + context.Template.GithubRepository.RepositoryNameWithOrganization + "/archive/" + context.Template.Version + ".zip"; - - var credentials = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}:", context.Template.GithubRepository.AccessToken); - credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials)); - - client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials); - client.Timeout = TimeSpan.FromMinutes(30); - - var fileContents = AsyncHelper.RunSync(() => client.GetByteArrayAsync(downloadUrl)); - - File.WriteAllBytes(context.Template.FilePath, fileContents); - } - } - } - - //public string GetExistingVersion(ProjectBuildContext context) - //{ - // var directoryInfo = new DirectoryInfo(templateRootPath); - // var existingFileName = directoryInfo.GetFiles().FirstOrDefault(f => f.Name.StartsWith(repositoryName))?.Name; - // var latestVersion = ""; - - // if (existingFileName != null) - // { - // var pFrom = existingFileName.IndexOf(repositoryName + "-", StringComparison.Ordinal) + (repositoryName + "-").Length; - // var pTo = existingFileName.LastIndexOf(".zip", StringComparison.Ordinal); - - // latestVersion = existingFileName.Substring(pFrom, pTo - pFrom); - // } - - // return latestVersion; - //} - } -} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/ProjectBuildResult.cs similarity index 68% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/ProjectBuildResult.cs index 77628e9767..dd43e8b63e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuildResult.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/ProjectBuildResult.cs @@ -1,12 +1,12 @@ namespace Volo.Abp.SolutionTemplating { - public class SolutionBuildResult + public class ProjectBuildResult { public byte[] ZipContent { get; } public string ProjectName { get; } - public SolutionBuildResult(byte[] zipContent, string projectName) + public ProjectBuildResult(byte[] zipContent, string projectName) { ZipContent = zipContent; ProjectName = projectName; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuilder.cs deleted file mode 100644 index 736ffad678..0000000000 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionBuilder.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.SolutionTemplating.Building; - -namespace Volo.Abp.SolutionTemplating -{ - public class SolutionBuilder : ITransientDependency - { - private readonly IHostingEnvironment _hostingEnvironment; - private readonly IRepository _downloadRepository; - - public SolutionBuilder( - IHostingEnvironment hostingEnvironment, - IRepository downloadRepository) - { - _hostingEnvironment = hostingEnvironment; - _downloadRepository = downloadRepository; - } - - public async Task BuildAsync( - TemplateInfo template, - string companyAndProjectName, - DatabaseProvider databaseProvider, - string version, - bool replaceLocalReferencesToNuget) - { - var stopwatch = Stopwatch.StartNew(); - - var templateRootPath = Path.Combine(_hostingEnvironment.ContentRootPath, "TemplateFiles"); //TODO: To another folder that is not in the deployment folder! - var solutionName = SolutionName.Parse(companyAndProjectName); - - var context = new ProjectBuildContext( - template, - new ProjectBuildRequest( - solutionName, - databaseProvider, - version - ), - templateRootPath - ); - - ProjectBuildPipelineBuilder.Build(context).Execute(context); - - stopwatch.Stop(); - - await _downloadRepository.InsertAsync( - new DownloadInfo( - solutionName.FullName, - template.Name, - databaseProvider, - context.Template.Version, - Convert.ToInt32(stopwatch.Elapsed.TotalMilliseconds) - ) - ); - - return new SolutionBuildResult(context.Result.ZipContent, solutionName.ProjectName); - } - } -} From e53279a6fb628f09552dc5dd7dc1e402581be69d Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 15:21:19 +0300 Subject: [PATCH 055/335] Initial working version of new project creation with temporary code. --- .../Volo.Abp.Cli.Core.csproj | 2 ++ .../Volo/Abp/Cli/AbpCliCoreModule.cs | 8 ++++-- .../Volo/Abp/Cli/Commands/MainHelpCommand.cs | 2 +- .../Abp/Cli/Commands/NewProjectCommand.cs | 1 - .../Abp/ProjectBuilding/ProjectBuildArgs.cs | 2 +- .../Abp/ProjectBuilding/ProjectBuilder.cs | 10 +++++++ .../ProjectBuilding/TemplateInfoProvider.cs | 26 +++---------------- .../Templates/MvcApplicationTemplate.cs | 10 +++++++ .../Templates/MvcModuleTemplate.cs | 11 +++++++- .../Templates/ServiceTemplate.cs | 9 +++++++ .../Building/Steps/FileEntryListReadStep.cs | 10 +++---- .../Building/TemplateInfo.cs | 13 +++++++++- .../src/Volo.Abp.Cli/Volo.Abp.Cli.csproj | 4 +++ 13 files changed, 74 insertions(+), 34 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj index 459d95089a..07a488123c 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -15,6 +15,8 @@ + + diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs index e56c95ff27..555fe14ca4 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs @@ -1,4 +1,5 @@ -using Volo.Abp.Domain; +using System.Text; +using Volo.Abp.Domain; using Volo.Abp.Json; using Volo.Abp.Modularity; @@ -10,6 +11,9 @@ namespace Volo.Abp.Cli )] public class AbpCliCoreModule : AbpModule { - + public override void ConfigureServices(ServiceConfigurationContext context) + { + Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/MainHelpCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/MainHelpCommand.cs index d06dcade91..96f7132934 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/MainHelpCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/MainHelpCommand.cs @@ -5,7 +5,7 @@ using Volo.Abp.DependencyInjection; namespace Volo.Abp.Cli.Commands { - public class MainHelpCommand : ITransientDependency + public class MainHelpCommand : IConsoleCommand, ITransientDependency { public Task ExecuteAsync(CommandLineArgs commandLineArgs) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs index b662bec85b..8addefbdde 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -7,7 +7,6 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.ProjectBuilding; using Volo.Abp.SolutionTemplating; using Volo.Abp.SolutionTemplating.Building; -using Volo.Abp.SolutionTemplating.Zipping; namespace Volo.Abp.Cli.Commands { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs index 5ca1a0ad99..34284ffafb 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs @@ -12,7 +12,7 @@ namespace Volo.Abp.ProjectBuilding [CanBeNull] public string TemplateName { get; set; } - public DatabaseProvider DatabaseProvider { get; } + public DatabaseProvider DatabaseProvider { get; set; } public ProjectBuildArgs( [NotNull] SolutionName solutionName, diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs index ee13db6e3f..cc0f91940b 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs @@ -23,6 +23,16 @@ namespace Volo.Abp.ProjectBuilding var templateInfo = GetTemplateInfo(args); + args.TemplateName = templateInfo.Name; + + if (args.DatabaseProvider == DatabaseProvider.NotSpecified) + { + if (templateInfo.DefaultDatabaseProvider != DatabaseProvider.NotSpecified) + { + args.DatabaseProvider = templateInfo.DefaultDatabaseProvider; + } + } + var templateFile = await TemplateStore.GetAsync(args.TemplateName, version); var context = new ProjectBuildContext( diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs index d65937eab2..bfc5aec303 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs @@ -9,40 +9,22 @@ namespace Volo.Abp.ProjectBuilding { public TemplateInfo GetDefault() { - return Get(TemplateNames.Mvc); + return Get(MvcApplicationTemplate.TemplateName); } public TemplateInfo Get(string name) { switch (name) { - case TemplateNames.Mvc: + case MvcApplicationTemplate.TemplateName: return new MvcApplicationTemplate(); - case TemplateNames.MvcModule: + case MvcModuleTemplate.TemplateName: return new MvcModuleTemplate(); - case TemplateNames.Service: + case ServiceTemplate.TemplateName: return new ServiceTemplate(); default: throw new Exception("There is no template found with given name: " + name); } } - - public static class TemplateNames - { - /// - /// "mvc". - /// - public const string Mvc = "mvc"; - - /// - /// "mvcmodule". - /// - public const string MvcModule = "mvcmodule"; - - /// - /// "service". - /// - public const string Service = "service"; - } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs index 7fe2fd7a0a..3b8dd55f54 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs @@ -6,6 +6,16 @@ namespace Volo.Abp.ProjectBuilding.Templates { public class MvcApplicationTemplate : TemplateInfo { + /// + /// "mvc". + /// + public const string TemplateName = "mvc"; + + public MvcApplicationTemplate() + : base(TemplateName, DatabaseProvider.EntityFrameworkCore) + { + } + public override IEnumerable GetCustomSteps(ProjectBuildContext context) { var steps = new List(); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs index 6549ce103c..a4f436932b 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs @@ -4,6 +4,15 @@ namespace Volo.Abp.ProjectBuilding.Templates { public class MvcModuleTemplate : TemplateInfo { - + /// + /// "mvcmodule". + /// + public const string TemplateName = "mvcmodule"; + + public MvcModuleTemplate() + : base(TemplateName) + { + + } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs index 7558891d34..ebbd9fa90a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs @@ -4,6 +4,15 @@ namespace Volo.Abp.ProjectBuilding.Templates { public class ServiceTemplate : TemplateInfo { + /// + /// "service". + /// + public const string TemplateName = "service"; + public ServiceTemplate() + : base(TemplateName) + { + + } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs index d1433725ec..794f169a26 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs @@ -9,16 +9,16 @@ namespace Volo.Abp.SolutionTemplating.Building.Steps { public override void Execute(ProjectBuildContext context) { - context.Files = GetEntriesFromZipFile(context.Template.FilePath); + context.Files = GetEntriesFromZipFile(context.TemplateFile.FileBytes); } - private static FileEntryList GetEntriesFromZipFile(string filePath, string rootFolder = null) + private static FileEntryList GetEntriesFromZipFile(byte[] fileBytes) { - using (var templateFileStream = File.OpenRead(filePath)) + using (var memoryStream = new MemoryStream(fileBytes)) { - using (var templateZipFile = ZipFile.Read(templateFileStream)) + using (var templateZipFile = ZipFile.Read(memoryStream)) { - return templateZipFile.ToFileEntryList(rootFolder); + return templateZipFile.ToFileEntryList(); } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs index 1756402664..0ef7d26a4f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs @@ -1,11 +1,22 @@ using System; using System.Collections.Generic; +using JetBrains.Annotations; namespace Volo.Abp.SolutionTemplating.Building { public abstract class TemplateInfo { - public string FilePath { get; set; } + public string Name { get; } + + public DatabaseProvider DefaultDatabaseProvider { get; } + + protected TemplateInfo( + [NotNull] string name, + DatabaseProvider defaultDatabaseProvider = DatabaseProvider.NotSpecified) + { + Name = Check.NotNullOrWhiteSpace(name, nameof(name)); + DefaultDatabaseProvider = Check.NotNull(defaultDatabaseProvider, nameof(defaultDatabaseProvider)); + } public virtual IEnumerable GetCustomSteps(ProjectBuildContext context) { diff --git a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj index f2f9424512..9cdc913391 100644 --- a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj +++ b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj @@ -10,6 +10,10 @@ + + + + From f5f987189dc1b76d58f75c2693f334ac96268b16 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 15:43:02 +0300 Subject: [PATCH 056/335] Get CLI & template version from the assembly. --- .../src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs | 9 ++++++++- .../Volo/Abp/ProjectBuilding/ProjectBuilder.cs | 5 +++-- .../System/Reflection/AbpAssemblyExtensions.cs | 12 ++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 framework/src/Volo.Abp.Core/System/Reflection/AbpAssemblyExtensions.cs diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs index 50108567e6..1b65577f1d 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs @@ -1,4 +1,6 @@ -using Microsoft.Extensions.DependencyInjection; +using System; +using System.Reflection; +using Microsoft.Extensions.DependencyInjection; using System.Threading.Tasks; using Volo.Abp.Cli.Args; using Volo.Abp.Cli.Commands; @@ -8,6 +10,8 @@ namespace Volo.Abp.Cli { public class CliService : ITransientDependency { + public static string Version => typeof(AbpCliCoreModule).Assembly.GetFileVersion(); + protected ICommandLineArgumentParser CommandLineArgumentParser { get; } protected ICommandSelector CommandSelector { get; } public IHybridServiceScopeFactory ServiceScopeFactory { get; } @@ -24,6 +28,9 @@ namespace Volo.Abp.Cli public async Task RunAsync(string[] args) { + Console.WriteLine("ABP CLI (abp.io)"); + Console.WriteLine("Version: " + Version); + var commandLineArgs = CommandLineArgumentParser.Parse(args); var commandType = CommandSelector.Select(commandLineArgs); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs index cc0f91940b..501d309845 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using Volo.Abp.Cli; using Volo.Abp.DependencyInjection; using Volo.Abp.SolutionTemplating; using Volo.Abp.SolutionTemplating.Building; @@ -19,8 +20,6 @@ namespace Volo.Abp.ProjectBuilding public async Task BuildAsync(ProjectBuildArgs args) { - var version = "0.16.0"; //TODO: Should get from somewhere! - var templateInfo = GetTemplateInfo(args); args.TemplateName = templateInfo.Name; @@ -33,6 +32,8 @@ namespace Volo.Abp.ProjectBuilding } } + var version = CliService.Version; + var templateFile = await TemplateStore.GetAsync(args.TemplateName, version); var context = new ProjectBuildContext( diff --git a/framework/src/Volo.Abp.Core/System/Reflection/AbpAssemblyExtensions.cs b/framework/src/Volo.Abp.Core/System/Reflection/AbpAssemblyExtensions.cs new file mode 100644 index 0000000000..0e61770618 --- /dev/null +++ b/framework/src/Volo.Abp.Core/System/Reflection/AbpAssemblyExtensions.cs @@ -0,0 +1,12 @@ +using System.Diagnostics; + +namespace System.Reflection +{ + public static class AbpAssemblyExtensions + { + public static string GetFileVersion(this Assembly assembly) + { + return FileVersionInfo.GetVersionInfo(assembly.Location).FileVersion; + } + } +} From 37ce88c29e093c3b90dcbcdce93aefa7ebe944e1 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 16:22:27 +0300 Subject: [PATCH 057/335] Added logging for CLI --- .../Volo.AbpWebSite.Web/publish-ignore.json | 1 + .../Volo/Abp/Cli/CliService.cs | 11 ++++-- .../Abp/Cli/Commands/NewProjectCommand.cs | 22 +++++++----- .../Abp/ProjectBuilding/AbpIoTemplateStore.cs | 36 ++++++++++++++++--- .../src/Volo.Abp.Cli/Volo.Abp.Cli.csproj | 5 +++ .../Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs | 6 ++-- .../src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs | 17 ++++++++- .../Volo/Abp/Modularity/ModuleManager.cs | 4 +-- 8 files changed, 83 insertions(+), 19 deletions(-) diff --git a/abp_io/src/Volo.AbpWebSite.Web/publish-ignore.json b/abp_io/src/Volo.AbpWebSite.Web/publish-ignore.json index 89e3176a69..c5e2fd7c51 100644 --- a/abp_io/src/Volo.AbpWebSite.Web/publish-ignore.json +++ b/abp_io/src/Volo.AbpWebSite.Web/publish-ignore.json @@ -3,6 +3,7 @@ "TemplateFiles/": {}, "Logs/": {}, "wwwroot/files/": {}, + "wwwroot/downloads/": {}, "appsettings.json": {}, "web.config": {} } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs index 1b65577f1d..502ab294e6 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs @@ -2,9 +2,12 @@ using System.Reflection; using Microsoft.Extensions.DependencyInjection; using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Cli.Args; using Volo.Abp.Cli.Commands; using Volo.Abp.DependencyInjection; +using Volo.Abp.ProjectBuilding; namespace Volo.Abp.Cli { @@ -12,6 +15,8 @@ namespace Volo.Abp.Cli { public static string Version => typeof(AbpCliCoreModule).Assembly.GetFileVersion(); + public ILogger Logger { get; set; } + protected ICommandLineArgumentParser CommandLineArgumentParser { get; } protected ICommandSelector CommandSelector { get; } public IHybridServiceScopeFactory ServiceScopeFactory { get; } @@ -24,12 +29,14 @@ namespace Volo.Abp.Cli CommandLineArgumentParser = commandLineArgumentParser; CommandSelector = commandSelector; ServiceScopeFactory = serviceScopeFactory; + + Logger = NullLogger.Instance; } public async Task RunAsync(string[] args) { - Console.WriteLine("ABP CLI (abp.io)"); - Console.WriteLine("Version: " + Version); + Logger.LogInformation("ABP CLI (abp.io)"); + Logger.LogInformation("Version: " + Version); var commandLineArgs = CommandLineArgumentParser.Parse(args); var commandType = CommandSelector.Select(commandLineArgs); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs index 8addefbdde..09fd578d85 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -2,6 +2,8 @@ using System.IO; using System.Threading.Tasks; using Ionic.Zip; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Cli.Args; using Volo.Abp.DependencyInjection; using Volo.Abp.ProjectBuilding; @@ -12,28 +14,32 @@ namespace Volo.Abp.Cli.Commands { public class NewProjectCommand : IConsoleCommand, ITransientDependency { + public ILogger Logger { get; set; } + protected ProjectBuilder ProjectBuilder { get; } public NewProjectCommand(ProjectBuilder projectBuilder) { ProjectBuilder = projectBuilder; + + Logger = NullLogger.Instance; } public async Task ExecuteAsync(CommandLineArgs commandLineArgs) { if (commandLineArgs.Target == null) { - Console.WriteLine("Project name is missing."); - Console.WriteLine("Usage:"); - Console.WriteLine(" abp new [-t ]"); - Console.WriteLine("Examples:"); - Console.WriteLine(" abp new Acme.BookStore"); - Console.WriteLine(" abp new Acme.BookStore mvc"); + Logger.LogWarning("Project name is missing."); + Logger.LogWarning("Usage:"); + Logger.LogWarning(" abp new [-t ]"); + Logger.LogWarning("Examples:"); + Logger.LogWarning(" abp new Acme.BookStore"); + Logger.LogWarning(" abp new Acme.BookStore mvc"); return; } - Console.WriteLine("Creating a new solution"); - Console.WriteLine("Solution name: " + commandLineArgs.Target); + Logger.LogInformation("Creating a new project..."); + Logger.LogInformation("Project name: " + commandLineArgs.Target); var result = await ProjectBuilder.BuildAsync( new ProjectBuildArgs( diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs index c8c36b967d..e81e7e414b 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs @@ -1,16 +1,44 @@ -using System.IO; +using System; +using System.IO; using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.DependencyInjection; +using Volo.Abp.IO; namespace Volo.Abp.ProjectBuilding { public class AbpIoTemplateStore : ITemplateStore, ITransientDependency { + public ILogger Logger { get; set; } + + public AbpIoTemplateStore() + { + Logger = NullLogger.Instance; + } + public async Task GetAsync(string templateName, string version) { - return new TemplateFile( - File.ReadAllBytes("C:\\Temp\\abp-templates\\" + version + "\\" + templateName + ".zip") - ); + var localCacheFolder = "C:\\Temp\\abp-template-cache\\" + version; + DirectoryHelper.CreateIfNotExists(localCacheFolder); + + var localCacheFile = Path.Combine(localCacheFolder, templateName + ".zip"); + if (File.Exists(localCacheFile)) + { + Logger.LogInformation("Using cached template: " + templateName + ", version: " + version); + return new TemplateFile(File.ReadAllBytes(localCacheFile)); + } + + Logger.LogInformation("Downloading template: " + templateName + ", version: " + version); + + using (var client = new System.Net.Http.HttpClient()) + { + client.Timeout = TimeSpan.FromMinutes(5); + var downloadUrl = "https://abp.io/downloads/templates/" + version + "/" + templateName + ".zip"; + var fileContents = await client.GetByteArrayAsync(downloadUrl); + File.WriteAllBytes(localCacheFile, fileContents); + return new TemplateFile(fileContents); + } } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj index 9cdc913391..4f0de79850 100644 --- a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj +++ b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj @@ -12,9 +12,14 @@ + + + + + diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs index 523dd6c813..339041ef8a 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs @@ -1,9 +1,11 @@ -using Volo.Abp.Modularity; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; namespace Volo.Abp.Cli { [DependsOn( - typeof(AbpCliCoreModule) + typeof(AbpCliCoreModule), + typeof(AbpAutofacModule) )] public class AbpCliModule : AbpModule { diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs index c7f321a8e1..706dc91d47 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs @@ -1,4 +1,6 @@ using Microsoft.Extensions.DependencyInjection; +using Serilog; +using Serilog.Events; using Volo.Abp.Threading; namespace Volo.Abp.Cli @@ -7,7 +9,20 @@ namespace Volo.Abp.Cli { private static void Main(string[] args) { - using (var application = AbpApplicationFactory.Create()) + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .Enrich.FromLogContext() + //.WriteTo.File("Logs/logs.txt") //TODO: Write logs to a global path + .WriteTo.Console() + .CreateLogger(); + + using (var application = AbpApplicationFactory.Create( + options => + { + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + })) { application.Initialize(); diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs index d79ae0b843..934948dc03 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleManager.cs @@ -42,12 +42,12 @@ namespace Volo.Abp.Modularity } } - _logger.LogInformation("Initialized all modules."); + _logger.LogInformation("Initialized all ABP modules."); } private void LogListOfModules() { - _logger.LogInformation("Loaded modules:"); + _logger.LogInformation("Loaded ABP modules:"); foreach (var module in _moduleContainer.Modules) { From e5579144595a457e06f87ad8540d1b28c387a319 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 16:35:32 +0300 Subject: [PATCH 058/335] Use user data folder for template cache and logging. --- .../src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs | 13 +++++++++++++ .../Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs | 3 ++- framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs new file mode 100644 index 0000000000..b0296671b3 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs @@ -0,0 +1,13 @@ +using System; +using System.IO; + +namespace Volo.Abp.Cli +{ + public static class CliPaths + { + public static string TemplateCachePath => Path.Combine(AbpRootPath, "templates"); + public static string CliLogPath => Path.Combine(AbpRootPath, "cli", "logs"); + + private static readonly string AbpRootPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".abp"); + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs index e81e7e414b..6f3956f604 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs @@ -3,6 +3,7 @@ using System.IO; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using Volo.Abp.Cli; using Volo.Abp.DependencyInjection; using Volo.Abp.IO; @@ -19,7 +20,7 @@ namespace Volo.Abp.ProjectBuilding public async Task GetAsync(string templateName, string version) { - var localCacheFolder = "C:\\Temp\\abp-template-cache\\" + version; + var localCacheFolder = Path.Combine(CliPaths.TemplateCachePath, version); DirectoryHelper.CreateIfNotExists(localCacheFolder); var localCacheFile = Path.Combine(localCacheFolder, templateName + ".zip"); diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs index 706dc91d47..02759655ff 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Serilog; using Serilog.Events; +using System.IO; using Volo.Abp.Threading; namespace Volo.Abp.Cli @@ -13,7 +14,7 @@ namespace Volo.Abp.Cli .MinimumLevel.Information() .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) .Enrich.FromLogContext() - //.WriteTo.File("Logs/logs.txt") //TODO: Write logs to a global path + .WriteTo.File(Path.Combine(CliPaths.CliLogPath, "abp-cli-logs.txt")) .WriteTo.Console() .CreateLogger(); From 379a2e48ad7f78506e6fb80b0694b71bd9439bb4 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 16:39:38 +0300 Subject: [PATCH 059/335] Move to a propert namespace. --- .../Volo/Abp/Cli/Commands/NewProjectCommand.cs | 5 +++-- .../Building/DatabaseProvider.cs | 2 +- .../Building/GithubRepositoryInfo.cs | 2 +- .../Building/ProjectBuildContext.cs | 5 ++--- .../Building/ProjectBuildContextExtensions.cs | 4 ++-- .../Building/ProjectBuildPipeline.cs | 2 +- .../Building/ProjectBuildPipelineBuilder.cs | 4 ++-- .../Building/ProjectBuildPipelineStep.cs | 2 +- .../Building/ProjectResult.cs | 2 +- .../Building/Steps/CreateProjectResultZipStep.cs | 6 +++--- .../Building/Steps/FileEntryListReadStep.cs | 6 +++--- .../Building/Steps/NugetReferenceReplaceStep.cs | 4 ++-- .../Building/Steps/RemoveProjectFromSolutionStep.cs | 2 +- .../Building/Steps/SolutionRenameStep.cs | 4 ++-- .../Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs | 4 ++-- .../Building/Steps/TemplateCodeDeleteStep.cs | 4 ++-- .../Building/TemplateInfo.cs | 2 +- .../DownloadInfo.cs | 4 ++-- .../Files/FileEntry.cs | 2 +- .../Files/FileEntryExtensions.cs | 2 +- .../Files/FileEntryList.cs | 2 +- .../Files/FileEntryListExtensions.cs | 2 +- .../Github/GithubRelease.cs | 2 +- .../Volo/Abp/ProjectBuilding/IProjectBuilder.cs | 1 - .../Volo/Abp/ProjectBuilding/ITemplateInfoProvider.cs | 2 +- .../Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs | 3 +-- .../ProjectBuildResult.cs | 2 +- .../Volo/Abp/ProjectBuilding/ProjectBuilder.cs | 3 +-- .../SolutionName.cs | 2 +- .../Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs | 2 +- .../ProjectBuilding/Templates/MvcApplicationTemplate.cs | 4 ++-- .../Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs | 2 +- .../Abp/ProjectBuilding/Templates/ServiceTemplate.cs | 2 +- .../Zipping/ZipFileExtensions.cs | 4 ++-- .../Volo/Abp/SolutionTemplating/StandardVersions.cs | 9 --------- 35 files changed, 49 insertions(+), 61 deletions(-) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/DatabaseProvider.cs (71%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/GithubRepositoryInfo.cs (94%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/ProjectBuildContext.cs (89%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/ProjectBuildContextExtensions.cs (83%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/ProjectBuildPipeline.cs (90%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/ProjectBuildPipelineBuilder.cs (86%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/ProjectBuildPipelineStep.cs (72%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/ProjectResult.cs (64%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/Steps/CreateProjectResultZipStep.cs (80%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/Steps/FileEntryListReadStep.cs (82%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/Steps/NugetReferenceReplaceStep.cs (97%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/Steps/RemoveProjectFromSolutionStep.cs (97%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/Steps/SolutionRenameStep.cs (97%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs (96%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/Steps/TemplateCodeDeleteStep.cs (82%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Building/TemplateInfo.cs (94%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/DownloadInfo.cs (92%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Files/FileEntry.cs (98%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Files/FileEntryExtensions.cs (98%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Files/FileEntryList.cs (83%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Files/FileEntryListExtensions.cs (92%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Github/GithubRelease.cs (90%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/ProjectBuildResult.cs (87%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/SolutionName.cs (97%) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/{SolutionTemplating => ProjectBuilding}/Zipping/ZipFileExtensions.cs (94%) delete mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/StandardVersions.cs diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs index 09fd578d85..a1e69d14ca 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -7,8 +7,7 @@ using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Cli.Args; using Volo.Abp.DependencyInjection; using Volo.Abp.ProjectBuilding; -using Volo.Abp.SolutionTemplating; -using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.ProjectBuilding.Building; namespace Volo.Abp.Cli.Commands { @@ -56,6 +55,8 @@ namespace Volo.Abp.Cli.Commands templateZipFile.ExtractAll(Directory.GetCurrentDirectory(), ExtractExistingFileAction.Throw); } } + + Logger.LogInformation($"Successfully created the project '{commandLineArgs.Target}'"); } protected virtual DatabaseProvider GetDatabaseProviderOrNull(CommandLineArgs commandLineArgs) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/DatabaseProvider.cs similarity index 71% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/DatabaseProvider.cs index e0e0f14e0b..0352bed89c 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/DatabaseProvider.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/DatabaseProvider.cs @@ -1,4 +1,4 @@ -namespace Volo.Abp.SolutionTemplating.Building +namespace Volo.Abp.ProjectBuilding.Building { public enum DatabaseProvider { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/GithubRepositoryInfo.cs similarity index 94% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/GithubRepositoryInfo.cs index f9d8812076..7a7277f8a4 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/GithubRepositoryInfo.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/GithubRepositoryInfo.cs @@ -1,6 +1,6 @@ using System; -namespace Volo.Abp.SolutionTemplating.Building +namespace Volo.Abp.ProjectBuilding.Building { public class GithubRepositoryInfo { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildContext.cs similarity index 89% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildContext.cs index b620f6dc02..7e16a377c6 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContext.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildContext.cs @@ -1,8 +1,7 @@ using JetBrains.Annotations; -using Volo.Abp.ProjectBuilding; -using Volo.Abp.SolutionTemplating.Files; +using Volo.Abp.ProjectBuilding.Files; -namespace Volo.Abp.SolutionTemplating.Building +namespace Volo.Abp.ProjectBuilding.Building { public class ProjectBuildContext { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildContextExtensions.cs similarity index 83% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildContextExtensions.cs index 7178a24238..b4623e6744 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildContextExtensions.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildContextExtensions.cs @@ -1,8 +1,8 @@ using System; using System.Linq; -using Volo.Abp.SolutionTemplating.Files; +using Volo.Abp.ProjectBuilding.Files; -namespace Volo.Abp.SolutionTemplating.Building +namespace Volo.Abp.ProjectBuilding.Building { public static class ProjectBuildContextExtensions { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildPipeline.cs similarity index 90% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildPipeline.cs index 3e2e617517..c4afe2aab6 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipeline.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildPipeline.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Volo.Abp.SolutionTemplating.Building +namespace Volo.Abp.ProjectBuilding.Building { public class ProjectBuildPipeline { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildPipelineBuilder.cs similarity index 86% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildPipelineBuilder.cs index 44062f9cee..35ea1bfe39 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildPipelineBuilder.cs @@ -1,6 +1,6 @@ -using Volo.Abp.SolutionTemplating.Building.Steps; +using Volo.Abp.ProjectBuilding.Building.Steps; -namespace Volo.Abp.SolutionTemplating.Building +namespace Volo.Abp.ProjectBuilding.Building { public static class ProjectBuildPipelineBuilder { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildPipelineStep.cs similarity index 72% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildPipelineStep.cs index d6ec90325f..3080224ed2 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectBuildPipelineStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectBuildPipelineStep.cs @@ -1,4 +1,4 @@ -namespace Volo.Abp.SolutionTemplating.Building +namespace Volo.Abp.ProjectBuilding.Building { public abstract class ProjectBuildPipelineStep { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectResult.cs similarity index 64% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectResult.cs index 3afc3e1a17..19230adfb5 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/ProjectResult.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/ProjectResult.cs @@ -1,4 +1,4 @@ -namespace Volo.Abp.SolutionTemplating.Building +namespace Volo.Abp.ProjectBuilding.Building { public class ProjectResult { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/CreateProjectResultZipStep.cs similarity index 80% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/CreateProjectResultZipStep.cs index 88f2558e58..a2b468effd 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/CreateProjectResultZipStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/CreateProjectResultZipStep.cs @@ -1,8 +1,8 @@ using Ionic.Zip; -using Volo.Abp.SolutionTemplating.Files; -using Volo.Abp.SolutionTemplating.Zipping; +using Volo.Abp.ProjectBuilding.Files; +using Volo.Abp.ProjectBuilding.Zipping; -namespace Volo.Abp.SolutionTemplating.Building.Steps +namespace Volo.Abp.ProjectBuilding.Building.Steps { public class CreateProjectResultZipStep : ProjectBuildPipelineStep { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/FileEntryListReadStep.cs similarity index 82% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/FileEntryListReadStep.cs index 794f169a26..22f1d8840f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/FileEntryListReadStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/FileEntryListReadStep.cs @@ -1,9 +1,9 @@ using System.IO; using Ionic.Zip; -using Volo.Abp.SolutionTemplating.Files; -using Volo.Abp.SolutionTemplating.Zipping; +using Volo.Abp.ProjectBuilding.Files; +using Volo.Abp.ProjectBuilding.Zipping; -namespace Volo.Abp.SolutionTemplating.Building.Steps +namespace Volo.Abp.ProjectBuilding.Building.Steps { public class FileEntryListReadStep : ProjectBuildPipelineStep { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/NugetReferenceReplaceStep.cs similarity index 97% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/NugetReferenceReplaceStep.cs index 460e174252..3d41c682dc 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/NugetReferenceReplaceStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/NugetReferenceReplaceStep.cs @@ -2,9 +2,9 @@ using System.IO; using System.Linq; using HtmlAgilityPack; -using Volo.Abp.SolutionTemplating.Files; +using Volo.Abp.ProjectBuilding.Files; -namespace Volo.Abp.SolutionTemplating.Building.Steps +namespace Volo.Abp.ProjectBuilding.Building.Steps { public class NugetReferenceReplaceStep : ProjectBuildPipelineStep { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/RemoveProjectFromSolutionStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/RemoveProjectFromSolutionStep.cs similarity index 97% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/RemoveProjectFromSolutionStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/RemoveProjectFromSolutionStep.cs index 7130b7ae1e..c956e4b4ab 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/RemoveProjectFromSolutionStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/RemoveProjectFromSolutionStep.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Volo.Abp.SolutionTemplating.Building.Steps +namespace Volo.Abp.ProjectBuilding.Building.Steps { public class RemoveProjectFromSolutionStep : ProjectBuildPipelineStep { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/SolutionRenameStep.cs similarity index 97% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/SolutionRenameStep.cs index 43d7356a32..20f2810633 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SolutionRenameStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/SolutionRenameStep.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Volo.Abp.SolutionTemplating.Files; +using Volo.Abp.ProjectBuilding.Files; -namespace Volo.Abp.SolutionTemplating.Building.Steps +namespace Volo.Abp.ProjectBuilding.Building.Steps { public class SolutionRenameStep : ProjectBuildPipelineStep { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs similarity index 96% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs index 64e1b44c11..6b77808f55 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/SwitchEntityFrameworkCoreToMongoDbStep.cs @@ -1,7 +1,7 @@ using System; -using Volo.Abp.SolutionTemplating.Files; +using Volo.Abp.ProjectBuilding.Files; -namespace Volo.Abp.SolutionTemplating.Building.Steps +namespace Volo.Abp.ProjectBuilding.Building.Steps { public class SwitchEntityFrameworkCoreToMongoDbStep : ProjectBuildPipelineStep { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/TemplateCodeDeleteStep.cs similarity index 82% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/TemplateCodeDeleteStep.cs index e35e11d441..aa3990905a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/Steps/TemplateCodeDeleteStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/Steps/TemplateCodeDeleteStep.cs @@ -1,6 +1,6 @@ -using Volo.Abp.SolutionTemplating.Files; +using Volo.Abp.ProjectBuilding.Files; -namespace Volo.Abp.SolutionTemplating.Building.Steps +namespace Volo.Abp.ProjectBuilding.Building.Steps { public class TemplateCodeDeleteStep : ProjectBuildPipelineStep { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/TemplateInfo.cs similarity index 94% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/TemplateInfo.cs index 0ef7d26a4f..c85d1d571c 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Building/TemplateInfo.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Building/TemplateInfo.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using JetBrains.Annotations; -namespace Volo.Abp.SolutionTemplating.Building +namespace Volo.Abp.ProjectBuilding.Building { public abstract class TemplateInfo { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/DownloadInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/DownloadInfo.cs similarity index 92% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/DownloadInfo.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/DownloadInfo.cs index 0865e1175c..9d07f6e022 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/DownloadInfo.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/DownloadInfo.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Volo.Abp.Domain.Entities.Auditing; -using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.ProjectBuilding.Building; -namespace Volo.Abp.SolutionTemplating +namespace Volo.Abp.ProjectBuilding { [Table("Downloads")] public class DownloadInfo : CreationAuditedAggregateRoot diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntry.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntry.cs similarity index 98% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntry.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntry.cs index 7f808ad4cf..5dd67846d2 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntry.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntry.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace Volo.Abp.SolutionTemplating.Files +namespace Volo.Abp.ProjectBuilding.Files { public class FileEntry { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntryExtensions.cs similarity index 98% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntryExtensions.cs index 999e8a9353..19bf75456c 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryExtensions.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntryExtensions.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Volo.Abp.SolutionTemplating.Files +namespace Volo.Abp.ProjectBuilding.Files { public static class FileEntryExtensions { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntryList.cs similarity index 83% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntryList.cs index 17b7b757ba..34543e31fa 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryList.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntryList.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Volo.Abp.SolutionTemplating.Files +namespace Volo.Abp.ProjectBuilding.Files { public class FileEntryList : List { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntryListExtensions.cs similarity index 92% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntryListExtensions.cs index 01acdf297b..1a1a47c1c6 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Files/FileEntryListExtensions.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Files/FileEntryListExtensions.cs @@ -1,7 +1,7 @@ using System; using Ionic.Zip; -namespace Volo.Abp.SolutionTemplating.Files +namespace Volo.Abp.ProjectBuilding.Files { public static class FileEntryListExtensions { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Github/GithubRelease.cs similarity index 90% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Github/GithubRelease.cs index 4e5ea612fe..449f9a43d5 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Github/GithubRelease.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Github/GithubRelease.cs @@ -1,7 +1,7 @@ using System; using Newtonsoft.Json; -namespace Volo.Abp.SolutionTemplating.Github +namespace Volo.Abp.ProjectBuilding.Github { [JsonObject] public class GithubRelease diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/IProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/IProjectBuilder.cs index 3011516061..c037442711 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/IProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/IProjectBuilder.cs @@ -1,5 +1,4 @@ using System.Threading.Tasks; -using Volo.Abp.SolutionTemplating; namespace Volo.Abp.ProjectBuilding { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateInfoProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateInfoProvider.cs index ad8dbbe874..789e11b341 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateInfoProvider.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ITemplateInfoProvider.cs @@ -1,4 +1,4 @@ -using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.ProjectBuilding.Building; namespace Volo.Abp.ProjectBuilding { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs index 34284ffafb..fffeb87a6c 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildArgs.cs @@ -1,6 +1,5 @@ using JetBrains.Annotations; -using Volo.Abp.SolutionTemplating; -using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.ProjectBuilding.Building; namespace Volo.Abp.ProjectBuilding { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/ProjectBuildResult.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildResult.cs similarity index 87% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/ProjectBuildResult.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildResult.cs index dd43e8b63e..2acf036ddc 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/ProjectBuildResult.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuildResult.cs @@ -1,4 +1,4 @@ -namespace Volo.Abp.SolutionTemplating +namespace Volo.Abp.ProjectBuilding { public class ProjectBuildResult { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs index 501d309845..3a5c7a6b8a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/ProjectBuilder.cs @@ -2,8 +2,7 @@ using System.Threading.Tasks; using Volo.Abp.Cli; using Volo.Abp.DependencyInjection; -using Volo.Abp.SolutionTemplating; -using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.ProjectBuilding.Building; namespace Volo.Abp.ProjectBuilding { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionName.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/SolutionName.cs similarity index 97% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionName.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/SolutionName.cs index 63ec52a432..0e274f5ceb 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/SolutionName.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/SolutionName.cs @@ -1,6 +1,6 @@ using System; -namespace Volo.Abp.SolutionTemplating +namespace Volo.Abp.ProjectBuilding { public class SolutionName { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs index bfc5aec303..e386bd7ef1 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/TemplateInfoProvider.cs @@ -1,7 +1,7 @@ using System; using Volo.Abp.DependencyInjection; +using Volo.Abp.ProjectBuilding.Building; using Volo.Abp.ProjectBuilding.Templates; -using Volo.Abp.SolutionTemplating.Building; namespace Volo.Abp.ProjectBuilding { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs index 3b8dd55f54..581fe9fcb5 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcApplicationTemplate.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using Volo.Abp.SolutionTemplating.Building; -using Volo.Abp.SolutionTemplating.Building.Steps; +using Volo.Abp.ProjectBuilding.Building; +using Volo.Abp.ProjectBuilding.Building.Steps; namespace Volo.Abp.ProjectBuilding.Templates { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs index a4f436932b..d2831d32b0 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs @@ -1,4 +1,4 @@ -using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.ProjectBuilding.Building; namespace Volo.Abp.ProjectBuilding.Templates { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs index ebbd9fa90a..4b547eead0 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/ServiceTemplate.cs @@ -1,4 +1,4 @@ -using Volo.Abp.SolutionTemplating.Building; +using Volo.Abp.ProjectBuilding.Building; namespace Volo.Abp.ProjectBuilding.Templates { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Zipping/ZipFileExtensions.cs similarity index 94% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Zipping/ZipFileExtensions.cs index e4e5290194..97536bd6ea 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/Zipping/ZipFileExtensions.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Zipping/ZipFileExtensions.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Ionic.Zip; -using Volo.Abp.SolutionTemplating.Files; +using Volo.Abp.ProjectBuilding.Files; -namespace Volo.Abp.SolutionTemplating.Zipping +namespace Volo.Abp.ProjectBuilding.Zipping { public static class ZipFileExtensions { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/StandardVersions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/StandardVersions.cs deleted file mode 100644 index df7b8b2e39..0000000000 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/SolutionTemplating/StandardVersions.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Volo.Abp.SolutionTemplating -{ - public static class StandardVersions - { - public const string LatestStable = "LatestStable"; - - public const string LatestUnstable = "LatestUnstable"; - } -} From 1de4314144a2ac7d2262181a70f343352b38d427 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 16:46:24 +0300 Subject: [PATCH 060/335] Move to 4-numbers versioning. --- common.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.props b/common.props index 3c6c9bda58..2915474fcc 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 0.17.0 + 0.17.0.0 $(NoWarn);CS1591 https://abp.io/assets/abp_nupkg.png https://abp.io From 0e75c0df4e2df36d6f509eb1c564b3a400e67a43 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 17:06:59 +0300 Subject: [PATCH 061/335] Revert back to 3-numbers versioning. --- common.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.props b/common.props index 2915474fcc..3c6c9bda58 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 0.17.0.0 + 0.17.0 $(NoWarn);CS1591 https://abp.io/assets/abp_nupkg.png https://abp.io From b2e6f6b75995d791bd0d5f5ffc2e8609346d04ef Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 21:22:08 +0300 Subject: [PATCH 062/335] Increment version. --- common.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.props b/common.props index 3c6c9bda58..1677ac8e8b 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 0.17.0 + 0.18.0 $(NoWarn);CS1591 https://abp.io/assets/abp_nupkg.png https://abp.io From 16ee8cd6241bcfbff7e0224484aea65dfb4a7194 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 21:32:03 +0300 Subject: [PATCH 063/335] Rename mvc module template folder --- .../Volo/Abp/Cli/Commands/NewProjectCommand.cs | 13 ++++++++----- .../ProjectBuilding/Templates/MvcModuleTemplate.cs | 4 ++-- templates/{module => mvc-module}/.gitattributes | 0 templates/{module => mvc-module}/.gitignore | 2 +- .../MyCompanyName.MyProjectName.sln | 0 .../MyCompanyName.MyProjectName.sln.DotSettings | 0 .../DemoAppDbContext.cs | 0 .../DemoAppDbContextFactory.cs | 0 .../DemoAppModule.cs | 0 .../Migrations/20190410095748_Initial.Designer.cs | 0 .../Migrations/20190410095748_Initial.cs | 0 .../Migrations/DemoAppDbContextModelSnapshot.cs | 0 .../MyCompanyName.MyProjectName.DemoApp.csproj | 0 .../Pages/Index.cshtml | 0 .../Pages/Index.cshtml.cs | 0 .../Pages/_ViewImports.cshtml | 0 .../MyCompanyName.MyProjectName.DemoApp/Program.cs | 0 .../Properties/launchSettings.json | 0 .../MyCompanyName.MyProjectName.DemoApp/Startup.cs | 0 .../abp.resourcemapping.js | 0 .../appsettings.json | 0 .../gulpfile.js | 0 .../package.json | 0 .../wwwroot/libs/abp/core/abp.js | 0 .../wwwroot/libs/abp/jquery/abp.jquery.js | 0 .../wwwroot/libs/bootstrap/css/bootstrap.css | 0 .../wwwroot/libs/bootstrap/js/bootstrap.bundle.js | 0 .../css/dataTables.bootstrap4.css | 0 .../datatables.net-bs4/js/dataTables.bootstrap4.js | 0 .../libs/datatables.net/js/jquery.dataTables.js | 0 .../wwwroot/libs/font-awesome/css/font-awesome.css | 0 .../libs/font-awesome/fonts/FontAwesome.otf | Bin .../font-awesome/fonts/fontawesome-webfont.eot | Bin .../font-awesome/fonts/fontawesome-webfont.svg | 0 .../font-awesome/fonts/fontawesome-webfont.ttf | Bin .../font-awesome/fonts/fontawesome-webfont.woff | Bin .../font-awesome/fonts/fontawesome-webfont.woff2 | Bin .../wwwroot/libs/jquery-form/jquery.form.min.js | 0 .../jquery.validate.unobtrusive.js | 0 .../libs/jquery-validation/jquery.validate.js | 0 .../jquery-validation/localization/messages_ar.js | 0 .../jquery-validation/localization/messages_az.js | 0 .../jquery-validation/localization/messages_bg.js | 0 .../localization/messages_bn_BD.js | 0 .../jquery-validation/localization/messages_ca.js | 0 .../jquery-validation/localization/messages_cs.js | 0 .../jquery-validation/localization/messages_da.js | 0 .../jquery-validation/localization/messages_de.js | 0 .../jquery-validation/localization/messages_el.js | 0 .../jquery-validation/localization/messages_es.js | 0 .../localization/messages_es_AR.js | 0 .../localization/messages_es_PE.js | 0 .../jquery-validation/localization/messages_et.js | 0 .../jquery-validation/localization/messages_eu.js | 0 .../jquery-validation/localization/messages_fa.js | 0 .../jquery-validation/localization/messages_fi.js | 0 .../jquery-validation/localization/messages_fr.js | 0 .../jquery-validation/localization/messages_ge.js | 0 .../jquery-validation/localization/messages_gl.js | 0 .../jquery-validation/localization/messages_he.js | 0 .../jquery-validation/localization/messages_hr.js | 0 .../jquery-validation/localization/messages_hu.js | 0 .../localization/messages_hy_AM.js | 0 .../jquery-validation/localization/messages_id.js | 0 .../jquery-validation/localization/messages_is.js | 0 .../jquery-validation/localization/messages_it.js | 0 .../jquery-validation/localization/messages_ja.js | 0 .../jquery-validation/localization/messages_ka.js | 0 .../jquery-validation/localization/messages_kk.js | 0 .../jquery-validation/localization/messages_ko.js | 0 .../jquery-validation/localization/messages_lt.js | 0 .../jquery-validation/localization/messages_lv.js | 0 .../jquery-validation/localization/messages_mk.js | 0 .../jquery-validation/localization/messages_my.js | 0 .../jquery-validation/localization/messages_nl.js | 0 .../jquery-validation/localization/messages_no.js | 0 .../jquery-validation/localization/messages_pl.js | 0 .../localization/messages_pt_BR.js | 0 .../localization/messages_pt_PT.js | 0 .../jquery-validation/localization/messages_ro.js | 0 .../jquery-validation/localization/messages_ru.js | 0 .../jquery-validation/localization/messages_sd.js | 0 .../jquery-validation/localization/messages_si.js | 0 .../jquery-validation/localization/messages_sk.js | 0 .../jquery-validation/localization/messages_sl.js | 0 .../jquery-validation/localization/messages_sr.js | 0 .../localization/messages_sr_lat.js | 0 .../jquery-validation/localization/messages_sv.js | 0 .../jquery-validation/localization/messages_th.js | 0 .../jquery-validation/localization/messages_tj.js | 0 .../jquery-validation/localization/messages_tr.js | 0 .../jquery-validation/localization/messages_uk.js | 0 .../jquery-validation/localization/messages_ur.js | 0 .../jquery-validation/localization/messages_vi.js | 0 .../jquery-validation/localization/messages_zh.js | 0 .../localization/messages_zh_TW.js | 0 .../jquery-validation/localization/methods_de.js | 0 .../localization/methods_es_CL.js | 0 .../jquery-validation/localization/methods_fi.js | 0 .../jquery-validation/localization/methods_nl.js | 0 .../jquery-validation/localization/methods_pt.js | 0 .../wwwroot/libs/jquery/jquery.js | 0 .../wwwroot/libs/lodash/lodash.min.js | 0 .../wwwroot/libs/select2/css/select2.min.css | 0 .../wwwroot/libs/select2/js/i18n/af.js | 0 .../wwwroot/libs/select2/js/i18n/ar.js | 0 .../wwwroot/libs/select2/js/i18n/az.js | 0 .../wwwroot/libs/select2/js/i18n/bg.js | 0 .../wwwroot/libs/select2/js/i18n/bs.js | 0 .../wwwroot/libs/select2/js/i18n/ca.js | 0 .../wwwroot/libs/select2/js/i18n/cs.js | 0 .../wwwroot/libs/select2/js/i18n/da.js | 0 .../wwwroot/libs/select2/js/i18n/de.js | 0 .../wwwroot/libs/select2/js/i18n/dsb.js | 0 .../wwwroot/libs/select2/js/i18n/el.js | 0 .../wwwroot/libs/select2/js/i18n/en.js | 0 .../wwwroot/libs/select2/js/i18n/es.js | 0 .../wwwroot/libs/select2/js/i18n/et.js | 0 .../wwwroot/libs/select2/js/i18n/eu.js | 0 .../wwwroot/libs/select2/js/i18n/fa.js | 0 .../wwwroot/libs/select2/js/i18n/fi.js | 0 .../wwwroot/libs/select2/js/i18n/fr.js | 0 .../wwwroot/libs/select2/js/i18n/gl.js | 0 .../wwwroot/libs/select2/js/i18n/he.js | 0 .../wwwroot/libs/select2/js/i18n/hi.js | 0 .../wwwroot/libs/select2/js/i18n/hr.js | 0 .../wwwroot/libs/select2/js/i18n/hsb.js | 0 .../wwwroot/libs/select2/js/i18n/hu.js | 0 .../wwwroot/libs/select2/js/i18n/hy.js | 0 .../wwwroot/libs/select2/js/i18n/id.js | 0 .../wwwroot/libs/select2/js/i18n/is.js | 0 .../wwwroot/libs/select2/js/i18n/it.js | 0 .../wwwroot/libs/select2/js/i18n/ja.js | 0 .../wwwroot/libs/select2/js/i18n/km.js | 0 .../wwwroot/libs/select2/js/i18n/ko.js | 0 .../wwwroot/libs/select2/js/i18n/lt.js | 0 .../wwwroot/libs/select2/js/i18n/lv.js | 0 .../wwwroot/libs/select2/js/i18n/mk.js | 0 .../wwwroot/libs/select2/js/i18n/ms.js | 0 .../wwwroot/libs/select2/js/i18n/nb.js | 0 .../wwwroot/libs/select2/js/i18n/nl.js | 0 .../wwwroot/libs/select2/js/i18n/pl.js | 0 .../wwwroot/libs/select2/js/i18n/ps.js | 0 .../wwwroot/libs/select2/js/i18n/pt-BR.js | 0 .../wwwroot/libs/select2/js/i18n/pt.js | 0 .../wwwroot/libs/select2/js/i18n/ro.js | 0 .../wwwroot/libs/select2/js/i18n/ru.js | 0 .../wwwroot/libs/select2/js/i18n/sk.js | 0 .../wwwroot/libs/select2/js/i18n/sl.js | 0 .../wwwroot/libs/select2/js/i18n/sr-Cyrl.js | 0 .../wwwroot/libs/select2/js/i18n/sr.js | 0 .../wwwroot/libs/select2/js/i18n/sv.js | 0 .../wwwroot/libs/select2/js/i18n/th.js | 0 .../wwwroot/libs/select2/js/i18n/tr.js | 0 .../wwwroot/libs/select2/js/i18n/uk.js | 0 .../wwwroot/libs/select2/js/i18n/vi.js | 0 .../wwwroot/libs/select2/js/i18n/zh-CN.js | 0 .../wwwroot/libs/select2/js/i18n/zh-TW.js | 0 .../wwwroot/libs/select2/js/select2.full.min.js | 0 .../wwwroot/libs/select2/js/select2.min.js | 0 .../wwwroot/libs/sweetalert/sweetalert.min.js | 0 .../wwwroot/libs/timeago/jquery.timeago.js | 0 .../wwwroot/libs/timeago/locales/README.md | 0 .../libs/timeago/locales/jquery.timeago.af.js | 0 .../libs/timeago/locales/jquery.timeago.am.js | 0 .../libs/timeago/locales/jquery.timeago.ar.js | 0 .../timeago/locales/jquery.timeago.az-short.js | 0 .../libs/timeago/locales/jquery.timeago.az.js | 0 .../libs/timeago/locales/jquery.timeago.bg.js | 0 .../libs/timeago/locales/jquery.timeago.bs.js | 0 .../libs/timeago/locales/jquery.timeago.ca.js | 0 .../libs/timeago/locales/jquery.timeago.cs.js | 0 .../libs/timeago/locales/jquery.timeago.cy.js | 0 .../libs/timeago/locales/jquery.timeago.da.js | 0 .../timeago/locales/jquery.timeago.de-short.js | 0 .../libs/timeago/locales/jquery.timeago.de.js | 0 .../libs/timeago/locales/jquery.timeago.dv.js | 0 .../libs/timeago/locales/jquery.timeago.el.js | 0 .../timeago/locales/jquery.timeago.en-short.js | 0 .../libs/timeago/locales/jquery.timeago.en.js | 0 .../timeago/locales/jquery.timeago.es-short.js | 0 .../libs/timeago/locales/jquery.timeago.es.js | 0 .../libs/timeago/locales/jquery.timeago.et.js | 0 .../libs/timeago/locales/jquery.timeago.eu.js | 0 .../timeago/locales/jquery.timeago.fa-short.js | 0 .../libs/timeago/locales/jquery.timeago.fa.js | 0 .../libs/timeago/locales/jquery.timeago.fi.js | 0 .../timeago/locales/jquery.timeago.fr-short.js | 0 .../libs/timeago/locales/jquery.timeago.fr.js | 0 .../libs/timeago/locales/jquery.timeago.gl.js | 0 .../libs/timeago/locales/jquery.timeago.he.js | 0 .../libs/timeago/locales/jquery.timeago.hr.js | 0 .../libs/timeago/locales/jquery.timeago.hu.js | 0 .../libs/timeago/locales/jquery.timeago.hy.js | 0 .../libs/timeago/locales/jquery.timeago.id.js | 0 .../libs/timeago/locales/jquery.timeago.is.js | 0 .../timeago/locales/jquery.timeago.it-short.js | 0 .../libs/timeago/locales/jquery.timeago.it.js | 0 .../libs/timeago/locales/jquery.timeago.ja.js | 0 .../libs/timeago/locales/jquery.timeago.jv.js | 0 .../libs/timeago/locales/jquery.timeago.ko.js | 0 .../libs/timeago/locales/jquery.timeago.ky.js | 0 .../libs/timeago/locales/jquery.timeago.lt.js | 0 .../libs/timeago/locales/jquery.timeago.lv.js | 0 .../libs/timeago/locales/jquery.timeago.mk.js | 0 .../libs/timeago/locales/jquery.timeago.nl.js | 0 .../libs/timeago/locales/jquery.timeago.no.js | 0 .../libs/timeago/locales/jquery.timeago.pl.js | 0 .../timeago/locales/jquery.timeago.pt-br-short.js | 0 .../libs/timeago/locales/jquery.timeago.pt-br.js | 0 .../timeago/locales/jquery.timeago.pt-short.js | 0 .../libs/timeago/locales/jquery.timeago.pt.js | 0 .../libs/timeago/locales/jquery.timeago.ro.js | 0 .../libs/timeago/locales/jquery.timeago.rs.js | 0 .../libs/timeago/locales/jquery.timeago.ru.js | 0 .../libs/timeago/locales/jquery.timeago.rw.js | 0 .../libs/timeago/locales/jquery.timeago.si.js | 0 .../libs/timeago/locales/jquery.timeago.sk.js | 0 .../libs/timeago/locales/jquery.timeago.sl.js | 0 .../libs/timeago/locales/jquery.timeago.sq.js | 0 .../libs/timeago/locales/jquery.timeago.sr.js | 0 .../libs/timeago/locales/jquery.timeago.sv.js | 0 .../libs/timeago/locales/jquery.timeago.th.js | 0 .../timeago/locales/jquery.timeago.tr-short.js | 0 .../libs/timeago/locales/jquery.timeago.tr.js | 0 .../libs/timeago/locales/jquery.timeago.uk.js | 0 .../libs/timeago/locales/jquery.timeago.ur.js | 0 .../libs/timeago/locales/jquery.timeago.uz.js | 0 .../libs/timeago/locales/jquery.timeago.vi.js | 0 .../libs/timeago/locales/jquery.timeago.zh-CN.js | 0 .../libs/timeago/locales/jquery.timeago.zh-TW.js | 0 .../wwwroot/libs/toastr/toastr.css | 0 .../wwwroot/libs/toastr/toastr.js.map | 0 .../wwwroot/libs/toastr/toastr.min.css | 0 .../wwwroot/libs/toastr/toastr.min.js | 0 .../MyCompanyName.MyProjectName.DemoApp/yarn.lock | 0 templates/{module => mvc-module}/common.props | 0 ...Name.MyProjectName.Application.Contracts.csproj | 0 .../Localization/ApplicationContracts/en.json | 0 .../Localization/ApplicationContracts/pt-BR.json | 0 .../Localization/ApplicationContracts/zh-Hans.json | 0 .../MyProjectNameApplicationContractsModule.cs | 0 .../MyProjectNamePermissionDefinitionProvider.cs | 0 .../MyProjectName/MyProjectNamePermissions.cs | 0 .../MyCompanyName.MyProjectName.Application.csproj | 0 .../MyProjectNameApplicationAutoMapperProfile.cs | 0 .../MyProjectNameApplicationModule.cs | 0 .../MyProjectNameSettingDefinitionProvider.cs | 0 .../MyProjectName/MyProjectNameSettings.cs | 0 ...yCompanyName.MyProjectName.Domain.Shared.csproj | 0 .../Localization/MyProjectNameResource.cs | 0 .../MyProjectName/MyProjectNameDomainErrorCodes.cs | 0 .../MyProjectNameDomainSharedModule.cs | 0 .../MyCompanyName.MyProjectName.Domain.csproj | 0 .../MyProjectName/Localization/Domain/en.json | 0 .../MyProjectName/Localization/Domain/pt-BR.json | 0 .../MyProjectName/Localization/Domain/zh-Hans.json | 0 .../MyProjectName/MyProjectNameConsts.cs | 0 .../MyProjectName/MyProjectNameDomainModule.cs | 0 ...nyName.MyProjectName.EntityFrameworkCore.csproj | 0 .../EntityFrameworkCore/IMyProjectNameDbContext.cs | 0 .../EntityFrameworkCore/MyProjectNameDbContext.cs | 0 ...yProjectNameDbContextModelCreatingExtensions.cs | 0 .../MyProjectNameEntityFrameworkCoreModule.cs | 0 ...yProjectNameModelBuilderConfigurationOptions.cs | 0 ...CompanyName.MyProjectName.HttpApi.Client.csproj | 0 .../MyProjectNameHttpApiClientModule.cs | 0 .../MyCompanyName.MyProjectName.HttpApi.csproj | 0 .../MyProjectName/MyProjectNameHttpApiModule.cs | 0 .../MyCompanyName.MyProjectName.MongoDB.csproj | 0 .../MongoDB/IMyProjectNameMongoDbContext.cs | 0 .../MongoDB/MyProjectNameMongoDbContext.cs | 0 .../MyProjectNameMongoDbContextExtensions.cs | 0 .../MongoDB/MyProjectNameMongoDbModule.cs | 0 ...ectNameMongoModelBuilderConfigurationOptions.cs | 0 .../Localization/Resources/MyProjectName/en.json | 0 .../Resources/MyProjectName/pt-BR.json | 0 .../Resources/MyProjectName/zh-Hans.json | 0 .../MyCompanyName.MyProjectName.Web.csproj | 0 .../MyProjectNameMenuContributor.cs | 0 .../MyProjectNameWebAutoMapperProfile.cs | 0 .../MyProjectNameWebModule.cs | 0 .../Pages/MyProjectName/_ViewImports.cshtml | 0 .../Properties/launchSettings.json | 0 ...panyName.MyProjectName.Application.Tests.csproj | 0 .../MyProjectNameApplicationTestModule.cs | 0 ...MyCompanyName.MyProjectName.Domain.Tests.csproj | 0 .../MyProjectName/MyProjectNameDomainTestBase.cs | 0 .../MyProjectName/MyProjectNameDomainTestModule.cs | 0 ....MyProjectName.EntityFrameworkCore.Tests.csproj | 0 .../MyEntityRepository_Tests.cs | 0 .../MyProjectNameEntityFrameworkCoreTestModule.cs | 0 ...yCompanyName.MyProjectName.MongoDB.Tests.csproj | 0 .../MongoDB/MyEntityRepository_Tests.cs | 0 .../MongoDB/MyProjectNameMongoDbTestModule.cs | 0 .../MyCompanyName.MyProjectName.TestBase.csproj | 0 .../MyProjectName/MyEntityRepository_Tests.cs | 0 .../MyProjectName/MyProjectNameTestBase.cs | 0 .../MyProjectName/MyProjectNameTestBaseModule.cs | 0 .../MyProjectName/MyProjectNameTestData.cs | 0 .../MyProjectName/MyProjectNameTestDataBuilder.cs | 0 301 files changed, 11 insertions(+), 8 deletions(-) rename templates/{module => mvc-module}/.gitattributes (100%) rename templates/{module => mvc-module}/.gitignore (98%) rename templates/{module => mvc-module}/MyCompanyName.MyProjectName.sln (100%) rename templates/{module => mvc-module}/MyCompanyName.MyProjectName.sln.DotSettings (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContext.cs (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContextFactory.cs (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/DemoAppModule.cs (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.Designer.cs (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.cs (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml.cs (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/Pages/_ViewImports.cshtml (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/Program.cs (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/Properties/launchSettings.json (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/Startup.cs (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/abp.resourcemapping.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/appsettings.json (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/gulpfile.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/package.json (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/core/abp.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/jquery/abp.jquery.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/css/bootstrap.css (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/js/bootstrap.bundle.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/css/dataTables.bootstrap4.css (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/js/dataTables.bootstrap4.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net/js/jquery.dataTables.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/css/font-awesome.css (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/FontAwesome.otf (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.eot (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.svg (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.ttf (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff2 (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-form/jquery.form.min.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/jquery.validate.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ar.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_az.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bg.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bn_BD.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ca.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_cs.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_da.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_de.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_el.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_AR.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_PE.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_et.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_eu.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fa.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fi.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ge.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_gl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_he.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hu.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hy_AM.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_id.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_is.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_it.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ja.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ka.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_kk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ko.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lt.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lv.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_mk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_my.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_nl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_no.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_BR.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_PT.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ro.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ru.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sd.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_si.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr_lat.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sv.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_th.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tj.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_uk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ur.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_vi.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh_TW.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_de.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_es_CL.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_fi.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_nl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_pt.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery/jquery.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/lodash/lodash.min.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/css/select2.min.css (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/af.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ar.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/az.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bg.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bs.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ca.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/cs.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/da.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/de.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/dsb.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/el.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/en.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/es.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/et.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/eu.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fa.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fi.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/gl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/he.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hi.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hsb.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hu.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hy.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/id.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/is.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/it.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ja.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/km.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ko.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lt.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lv.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/mk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ms.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nb.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ps.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt-BR.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ro.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ru.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr-Cyrl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sv.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/th.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/tr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/uk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/vi.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-CN.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-TW.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.full.min.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.min.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/sweetalert/sweetalert.min.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/jquery.timeago.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/README.md (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.af.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.am.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ar.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bg.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bs.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ca.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cs.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cy.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.da.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.dv.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.el.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.et.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.eu.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fi.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.gl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.he.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hu.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hy.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.id.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.is.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ja.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.jv.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ko.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ky.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lt.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lv.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.mk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.nl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.no.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ro.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rs.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ru.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rw.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.si.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sl.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sq.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sv.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.th.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr-short.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uk.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ur.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uz.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.vi.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-CN.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-TW.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.css (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.js.map (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.css (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.js (100%) rename templates/{module => mvc-module}/app/MyCompanyName.MyProjectName.DemoApp/yarn.lock (100%) rename templates/{module => mvc-module}/common.props (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/en.json (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/pt-BR.json (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/zh-Hans.json (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissionDefinitionProvider.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationAutoMapperProfile.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettingDefinitionProvider.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettings.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/Localization/MyProjectNameResource.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainErrorCodes.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/en.json (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/pt-BR.json (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/zh-Hans.json (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameConsts.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/IMyProjectNameDbContext.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContext.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreModule.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameModelBuilderConfigurationOptions.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName/MyProjectName/MyProjectNameHttpApiClientModule.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName/MyProjectName/MyProjectNameHttpApiModule.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/IMyProjectNameMongoDbContext.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContext.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContextExtensions.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbModule.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoModelBuilderConfigurationOptions.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/en.json (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/pt-BR.json (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/zh-Hans.json (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Web/MyProjectNameMenuContributor.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/_ViewImports.cshtml (100%) rename templates/{module => mvc-module}/src/MyCompanyName.MyProjectName.Web/Properties/launchSettings.json (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName/MyProjectName/MyProjectNameApplicationTestModule.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestBase.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestModule.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyEntityRepository_Tests.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyEntityRepository_Tests.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyEntityRepository_Tests.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBase.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBaseModule.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestData.cs (100%) rename templates/{module => mvc-module}/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestDataBuilder.cs (100%) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs index a1e69d14ca..9f4d20016a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -1,5 +1,4 @@ -using System; -using System.IO; +using System.IO; using System.Threading.Tasks; using Ionic.Zip; using Microsoft.Extensions.Logging; @@ -30,10 +29,14 @@ namespace Volo.Abp.Cli.Commands { Logger.LogWarning("Project name is missing."); Logger.LogWarning("Usage:"); - Logger.LogWarning(" abp new [-t ]"); + Logger.LogWarning(" abp new [-t|--template] [-d|--database-provider]"); + Logger.LogWarning(""); + Logger.LogWarning(""); + Logger.LogWarning(""); Logger.LogWarning("Examples:"); Logger.LogWarning(" abp new Acme.BookStore"); - Logger.LogWarning(" abp new Acme.BookStore mvc"); + Logger.LogWarning(" abp new Acme.BookStore -t mvc-module"); + Logger.LogWarning(" abp new Acme.BookStore -t mvc -d mongodb"); return; } @@ -84,7 +87,7 @@ namespace Volo.Abp.Cli.Commands public static class DatabaseProvider { public const string Short = "d"; - public const string Long = "databaseProvider"; + public const string Long = "database-provider"; } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs index d2831d32b0..f37c967b2f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/Templates/MvcModuleTemplate.cs @@ -5,9 +5,9 @@ namespace Volo.Abp.ProjectBuilding.Templates public class MvcModuleTemplate : TemplateInfo { /// - /// "mvcmodule". + /// "mvc-module". /// - public const string TemplateName = "mvcmodule"; + public const string TemplateName = "mvc-module"; public MvcModuleTemplate() : base(TemplateName) diff --git a/templates/module/.gitattributes b/templates/mvc-module/.gitattributes similarity index 100% rename from templates/module/.gitattributes rename to templates/mvc-module/.gitattributes diff --git a/templates/module/.gitignore b/templates/mvc-module/.gitignore similarity index 98% rename from templates/module/.gitignore rename to templates/mvc-module/.gitignore index 1114901d9b..91ce692e99 100644 --- a/templates/module/.gitignore +++ b/templates/mvc-module/.gitignore @@ -252,4 +252,4 @@ paket-files/ *.sln.iml # MyProjectName -src/MyCompanyName.MyProjectName.Web/Logs/logs.txt +app/MyCompanyName.MyProjectName.DemoApp/Logs/logs.txt diff --git a/templates/module/MyCompanyName.MyProjectName.sln b/templates/mvc-module/MyCompanyName.MyProjectName.sln similarity index 100% rename from templates/module/MyCompanyName.MyProjectName.sln rename to templates/mvc-module/MyCompanyName.MyProjectName.sln diff --git a/templates/module/MyCompanyName.MyProjectName.sln.DotSettings b/templates/mvc-module/MyCompanyName.MyProjectName.sln.DotSettings similarity index 100% rename from templates/module/MyCompanyName.MyProjectName.sln.DotSettings rename to templates/mvc-module/MyCompanyName.MyProjectName.sln.DotSettings diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContext.cs b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContext.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContext.cs rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContext.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContextFactory.cs b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContextFactory.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContextFactory.cs rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppDbContextFactory.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppModule.cs b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppModule.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppModule.cs rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/DemoAppModule.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.Designer.cs b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.Designer.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.Designer.cs rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.Designer.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.cs b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.cs rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190410095748_Initial.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml.cs b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml.cs rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Pages/Index.cshtml.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Pages/_ViewImports.cshtml b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Pages/_ViewImports.cshtml similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Pages/_ViewImports.cshtml rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Pages/_ViewImports.cshtml diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Program.cs b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Program.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Program.cs rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Program.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Properties/launchSettings.json b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Properties/launchSettings.json similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Properties/launchSettings.json rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Properties/launchSettings.json diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Startup.cs b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Startup.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Startup.cs rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/Startup.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/abp.resourcemapping.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/abp.resourcemapping.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/abp.resourcemapping.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/abp.resourcemapping.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/appsettings.json b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/appsettings.json similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/appsettings.json rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/appsettings.json diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/gulpfile.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/gulpfile.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/gulpfile.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/gulpfile.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/package.json b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/package.json similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/package.json rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/package.json diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/core/abp.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/core/abp.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/core/abp.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/core/abp.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/jquery/abp.jquery.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/jquery/abp.jquery.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/jquery/abp.jquery.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/abp/jquery/abp.jquery.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/css/bootstrap.css b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/css/bootstrap.css similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/css/bootstrap.css rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/css/bootstrap.css diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/js/bootstrap.bundle.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/js/bootstrap.bundle.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/js/bootstrap.bundle.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/bootstrap/js/bootstrap.bundle.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/css/dataTables.bootstrap4.css b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/css/dataTables.bootstrap4.css similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/css/dataTables.bootstrap4.css rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/css/dataTables.bootstrap4.css diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/js/dataTables.bootstrap4.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/js/dataTables.bootstrap4.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/js/dataTables.bootstrap4.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net-bs4/js/dataTables.bootstrap4.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net/js/jquery.dataTables.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net/js/jquery.dataTables.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net/js/jquery.dataTables.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/datatables.net/js/jquery.dataTables.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/css/font-awesome.css b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/css/font-awesome.css similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/css/font-awesome.css rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/css/font-awesome.css diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/FontAwesome.otf b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/FontAwesome.otf similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/FontAwesome.otf rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/FontAwesome.otf diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.eot b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.eot similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.eot rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.eot diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.svg b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.svg similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.svg rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.svg diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.ttf b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.ttf similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.ttf rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.ttf diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff2 b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff2 similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff2 rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/font-awesome/fonts/fontawesome-webfont.woff2 diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-form/jquery.form.min.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-form/jquery.form.min.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-form/jquery.form.min.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-form/jquery.form.min.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/jquery.validate.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/jquery.validate.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/jquery.validate.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/jquery.validate.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ar.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ar.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ar.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ar.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_az.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_az.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_az.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_az.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bg.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bg.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bg.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bg.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bn_BD.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bn_BD.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bn_BD.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_bn_BD.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ca.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ca.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ca.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ca.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_cs.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_cs.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_cs.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_cs.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_da.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_da.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_da.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_da.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_de.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_de.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_de.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_de.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_el.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_el.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_el.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_el.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_AR.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_AR.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_AR.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_AR.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_PE.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_PE.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_PE.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_es_PE.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_et.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_et.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_et.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_et.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_eu.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_eu.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_eu.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_eu.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fa.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fa.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fa.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fa.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fi.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fi.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fi.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fi.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_fr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ge.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ge.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ge.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ge.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_gl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_gl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_gl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_gl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_he.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_he.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_he.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_he.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hu.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hu.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hu.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hu.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hy_AM.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hy_AM.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hy_AM.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_hy_AM.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_id.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_id.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_id.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_id.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_is.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_is.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_is.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_is.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_it.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_it.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_it.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_it.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ja.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ja.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ja.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ja.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ka.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ka.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ka.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ka.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_kk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_kk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_kk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_kk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ko.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ko.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ko.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ko.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lt.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lt.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lt.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lt.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lv.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lv.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lv.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_lv.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_mk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_mk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_mk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_mk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_my.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_my.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_my.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_my.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_nl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_nl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_nl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_nl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_no.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_no.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_no.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_no.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_BR.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_BR.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_BR.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_BR.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_PT.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_PT.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_PT.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_pt_PT.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ro.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ro.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ro.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ro.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ru.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ru.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ru.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ru.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sd.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sd.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sd.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sd.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_si.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_si.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_si.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_si.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr_lat.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr_lat.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr_lat.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sr_lat.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sv.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sv.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sv.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_sv.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_th.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_th.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_th.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_th.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tj.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tj.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tj.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tj.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_tr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_uk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_uk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_uk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_uk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ur.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ur.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ur.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_ur.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_vi.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_vi.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_vi.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_vi.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh_TW.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh_TW.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh_TW.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/messages_zh_TW.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_de.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_de.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_de.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_de.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_es_CL.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_es_CL.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_es_CL.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_es_CL.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_fi.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_fi.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_fi.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_fi.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_nl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_nl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_nl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_nl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_pt.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_pt.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_pt.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery-validation/localization/methods_pt.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery/jquery.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery/jquery.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery/jquery.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/jquery/jquery.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/lodash/lodash.min.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/lodash/lodash.min.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/lodash/lodash.min.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/lodash/lodash.min.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/css/select2.min.css b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/css/select2.min.css similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/css/select2.min.css rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/css/select2.min.css diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/af.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/af.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/af.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/af.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ar.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ar.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ar.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ar.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/az.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/az.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/az.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/az.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bg.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bg.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bg.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bg.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bs.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bs.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bs.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/bs.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ca.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ca.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ca.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ca.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/cs.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/cs.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/cs.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/cs.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/da.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/da.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/da.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/da.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/de.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/de.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/de.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/de.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/dsb.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/dsb.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/dsb.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/dsb.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/el.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/el.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/el.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/el.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/en.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/en.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/en.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/en.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/es.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/es.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/es.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/es.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/et.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/et.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/et.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/et.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/eu.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/eu.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/eu.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/eu.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fa.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fa.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fa.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fa.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fi.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fi.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fi.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fi.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/fr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/gl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/gl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/gl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/gl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/he.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/he.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/he.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/he.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hi.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hi.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hi.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hi.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hsb.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hsb.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hsb.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hsb.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hu.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hu.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hu.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hu.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hy.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hy.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hy.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/hy.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/id.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/id.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/id.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/id.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/is.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/is.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/is.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/is.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/it.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/it.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/it.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/it.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ja.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ja.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ja.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ja.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/km.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/km.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/km.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/km.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ko.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ko.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ko.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ko.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lt.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lt.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lt.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lt.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lv.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lv.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lv.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/lv.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/mk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/mk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/mk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/mk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ms.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ms.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ms.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ms.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nb.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nb.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nb.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nb.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/nl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ps.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ps.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ps.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ps.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt-BR.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt-BR.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt-BR.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt-BR.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/pt.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ro.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ro.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ro.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ro.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ru.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ru.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ru.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/ru.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr-Cyrl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr-Cyrl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr-Cyrl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr-Cyrl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sv.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sv.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sv.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/sv.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/th.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/th.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/th.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/th.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/tr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/tr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/tr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/tr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/uk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/uk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/uk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/uk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/vi.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/vi.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/vi.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/vi.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-CN.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-CN.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-CN.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-CN.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-TW.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-TW.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-TW.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/i18n/zh-TW.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.full.min.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.full.min.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.full.min.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.full.min.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.min.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.min.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.min.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/select2/js/select2.min.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/sweetalert/sweetalert.min.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/sweetalert/sweetalert.min.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/sweetalert/sweetalert.min.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/sweetalert/sweetalert.min.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/jquery.timeago.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/jquery.timeago.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/jquery.timeago.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/jquery.timeago.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/README.md b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/README.md similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/README.md rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/README.md diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.af.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.af.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.af.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.af.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.am.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.am.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.am.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.am.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ar.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ar.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ar.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ar.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.az.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bg.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bg.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bg.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bg.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bs.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bs.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bs.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.bs.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ca.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ca.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ca.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ca.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cs.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cs.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cs.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cs.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cy.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cy.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cy.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.cy.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.da.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.da.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.da.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.da.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.de.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.dv.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.dv.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.dv.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.dv.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.el.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.el.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.el.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.el.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.en.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.es.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.et.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.et.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.et.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.et.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.eu.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.eu.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.eu.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.eu.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fa.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fi.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fi.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fi.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fi.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.fr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.gl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.gl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.gl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.gl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.he.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.he.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.he.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.he.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hu.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hu.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hu.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hu.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hy.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hy.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hy.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.hy.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.id.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.id.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.id.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.id.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.is.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.is.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.is.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.is.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.it.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ja.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ja.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ja.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ja.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.jv.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.jv.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.jv.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.jv.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ko.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ko.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ko.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ko.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ky.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ky.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ky.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ky.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lt.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lt.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lt.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lt.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lv.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lv.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lv.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.lv.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.mk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.mk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.mk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.mk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.nl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.nl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.nl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.nl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.no.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.no.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.no.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.no.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-br.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.pt.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ro.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ro.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ro.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ro.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rs.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rs.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rs.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rs.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ru.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ru.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ru.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ru.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rw.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rw.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rw.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.rw.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.si.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.si.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.si.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.si.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sl.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sl.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sl.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sl.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sq.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sq.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sq.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sq.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sv.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sv.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sv.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.sv.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.th.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.th.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.th.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.th.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr-short.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr-short.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr-short.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr-short.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.tr.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uk.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uk.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uk.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uk.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ur.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ur.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ur.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.ur.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uz.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uz.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uz.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.uz.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.vi.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.vi.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.vi.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.vi.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-CN.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-CN.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-CN.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-CN.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-TW.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-TW.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-TW.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/timeago/locales/jquery.timeago.zh-TW.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.css b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.css similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.css rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.css diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.js.map b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.js.map similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.js.map rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.js.map diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.css b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.css similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.css rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.css diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.js b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.js similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.js rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/wwwroot/libs/toastr/toastr.min.js diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/yarn.lock b/templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/yarn.lock similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/yarn.lock rename to templates/mvc-module/app/MyCompanyName.MyProjectName.DemoApp/yarn.lock diff --git a/templates/module/common.props b/templates/mvc-module/common.props similarity index 100% rename from templates/module/common.props rename to templates/mvc-module/common.props diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName.MyProjectName.Application.Contracts.csproj diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/en.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/en.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/en.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/en.json diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/pt-BR.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/pt-BR.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/pt-BR.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/pt-BR.json diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/zh-Hans.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/zh-Hans.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/zh-Hans.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/Localization/ApplicationContracts/zh-Hans.json diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNameApplicationContractsModule.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissionDefinitionProvider.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissionDefinitionProvider.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissionDefinitionProvider.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissionDefinitionProvider.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application.Contracts/MyCompanyName/MyProjectName/MyProjectNamePermissions.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationAutoMapperProfile.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationAutoMapperProfile.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationAutoMapperProfile.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationAutoMapperProfile.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameApplicationModule.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettingDefinitionProvider.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettingDefinitionProvider.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettingDefinitionProvider.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettingDefinitionProvider.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettings.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettings.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettings.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Application/MyCompanyName/MyProjectName/MyProjectNameSettings.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/Localization/MyProjectNameResource.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/Localization/MyProjectNameResource.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/Localization/MyProjectNameResource.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/Localization/MyProjectNameResource.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainErrorCodes.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainErrorCodes.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainErrorCodes.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainErrorCodes.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName/MyProjectName/MyProjectNameDomainSharedModule.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName.MyProjectName.Domain.csproj diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/en.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/en.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/en.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/en.json diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/pt-BR.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/pt-BR.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/pt-BR.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/pt-BR.json diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/zh-Hans.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/zh-Hans.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/zh-Hans.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/Localization/Domain/zh-Hans.json diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameConsts.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameConsts.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameConsts.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameConsts.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Domain/MyCompanyName/MyProjectName/MyProjectNameDomainModule.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj b/templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj rename to templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName.MyProjectName.EntityFrameworkCore.csproj diff --git a/templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/IMyProjectNameDbContext.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/IMyProjectNameDbContext.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/IMyProjectNameDbContext.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/IMyProjectNameDbContext.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContext.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContext.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContext.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContext.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreModule.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreModule.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreModule.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreModule.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameModelBuilderConfigurationOptions.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameModelBuilderConfigurationOptions.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameModelBuilderConfigurationOptions.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.EntityFrameworkCore/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameModelBuilderConfigurationOptions.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj b/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj rename to templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName.MyProjectName.HttpApi.Client.csproj diff --git a/templates/module/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName/MyProjectName/MyProjectNameHttpApiClientModule.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName/MyProjectName/MyProjectNameHttpApiClientModule.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName/MyProjectName/MyProjectNameHttpApiClientModule.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi.Client/MyCompanyName/MyProjectName/MyProjectNameHttpApiClientModule.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj b/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj rename to templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName.MyProjectName.HttpApi.csproj diff --git a/templates/module/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName/MyProjectName/MyProjectNameHttpApiModule.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName/MyProjectName/MyProjectNameHttpApiModule.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName/MyProjectName/MyProjectNameHttpApiModule.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyCompanyName/MyProjectName/MyProjectNameHttpApiModule.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj b/templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj rename to templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName.MyProjectName.MongoDB.csproj diff --git a/templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/IMyProjectNameMongoDbContext.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/IMyProjectNameMongoDbContext.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/IMyProjectNameMongoDbContext.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/IMyProjectNameMongoDbContext.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContext.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContext.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContext.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContext.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContextExtensions.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContextExtensions.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContextExtensions.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbContextExtensions.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbModule.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbModule.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbModule.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbModule.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoModelBuilderConfigurationOptions.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoModelBuilderConfigurationOptions.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoModelBuilderConfigurationOptions.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.MongoDB/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoModelBuilderConfigurationOptions.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/en.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/en.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/en.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/en.json diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/pt-BR.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/pt-BR.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/pt-BR.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/pt-BR.json diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/zh-Hans.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/zh-Hans.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/zh-Hans.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Localization/Resources/MyProjectName/zh-Hans.json diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameMenuContributor.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/MyProjectNameMenuContributor.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameMenuContributor.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Web/MyProjectNameMenuContributor.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/_ViewImports.cshtml b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/_ViewImports.cshtml similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/_ViewImports.cshtml rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/_ViewImports.cshtml diff --git a/templates/module/src/MyCompanyName.MyProjectName.Web/Properties/launchSettings.json b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Properties/launchSettings.json similarity index 100% rename from templates/module/src/MyCompanyName.MyProjectName.Web/Properties/launchSettings.json rename to templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Properties/launchSettings.json diff --git a/templates/module/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj b/templates/mvc-module/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj rename to templates/mvc-module/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj diff --git a/templates/module/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName/MyProjectName/MyProjectNameApplicationTestModule.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName/MyProjectName/MyProjectNameApplicationTestModule.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName/MyProjectName/MyProjectNameApplicationTestModule.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName/MyProjectName/MyProjectNameApplicationTestModule.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj b/templates/mvc-module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj rename to templates/mvc-module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName.MyProjectName.Domain.Tests.csproj diff --git a/templates/module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestBase.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestBase.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestBase.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestBase.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestModule.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestModule.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestModule.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.Domain.Tests/MyCompanyName/MyProjectName/MyProjectNameDomainTestModule.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj b/templates/mvc-module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj rename to templates/mvc-module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj diff --git a/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyEntityRepository_Tests.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyEntityRepository_Tests.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyEntityRepository_Tests.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyEntityRepository_Tests.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName/MyProjectName/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreTestModule.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj b/templates/mvc-module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj rename to templates/mvc-module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj diff --git a/templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyEntityRepository_Tests.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyEntityRepository_Tests.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyEntityRepository_Tests.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyEntityRepository_Tests.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName/MyProjectName/MongoDB/MyProjectNameMongoDbTestModule.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj b/templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj rename to templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName.MyProjectName.TestBase.csproj diff --git a/templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyEntityRepository_Tests.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyEntityRepository_Tests.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyEntityRepository_Tests.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyEntityRepository_Tests.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBase.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBase.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBase.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBase.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBaseModule.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBaseModule.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBaseModule.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestBaseModule.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestData.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestData.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestData.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestData.cs diff --git a/templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestDataBuilder.cs b/templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestDataBuilder.cs similarity index 100% rename from templates/module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestDataBuilder.cs rename to templates/mvc-module/test/MyCompanyName.MyProjectName.TestBase/MyCompanyName/MyProjectName/MyProjectNameTestDataBuilder.cs From 915dec7bac41062b7c1545a60397e67ff9762d32 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Fri, 3 May 2019 21:35:13 +0300 Subject: [PATCH 064/335] Enhance help for new command --- .../Volo/Abp/Cli/Commands/NewProjectCommand.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs index 9f4d20016a..94a9181eb2 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -28,10 +28,13 @@ namespace Volo.Abp.Cli.Commands if (commandLineArgs.Target == null) { Logger.LogWarning("Project name is missing."); + Logger.LogWarning(""); Logger.LogWarning("Usage:"); Logger.LogWarning(" abp new [-t|--template] [-d|--database-provider]"); Logger.LogWarning(""); - Logger.LogWarning(""); + Logger.LogWarning("Options:"); + Logger.LogWarning("-t|--template "); + Logger.LogWarning("-d|--database-provider "); Logger.LogWarning(""); Logger.LogWarning("Examples:"); Logger.LogWarning(" abp new Acme.BookStore"); From 189b97c6dcec5699b4ca8dfb983f46ec49053b27 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 5 May 2019 12:07:21 +0800 Subject: [PATCH 065/335] fix #1090 Use the Repository Update method in the Update method of CrudAppService. --- .../Volo/Abp/Application/Services/AsyncCrudAppService.cs | 1 + .../Volo/Abp/Application/Services/CrudAppService.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs index 6e3b476b5c..bf769dc78b 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs @@ -106,6 +106,7 @@ namespace Volo.Abp.Application.Services //TODO: Check if input has id different than given id and normalize if it's default value, throw ex otherwise MapToEntity(input, entity); + await Repository.UpdateAsync(entity); await CurrentUnitOfWork.SaveChangesAsync(); return MapToEntityDto(entity); diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs index 1fd6f869ff..60017e918f 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs @@ -100,6 +100,7 @@ namespace Volo.Abp.Application.Services var entity = GetEntityById(id); MapToEntity(input, entity); + Repository.Update(entity); CurrentUnitOfWork.SaveChanges(); return MapToEntityDto(entity); From b5a58b4ad848e5639c814be19f448d8f2eababf9 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Sun, 5 May 2019 21:29:49 +0300 Subject: [PATCH 066/335] Fix mvc module path. --- build-all.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-all.ps1 b/build-all.ps1 index 8393efd9fb..b95051d6ff 100644 --- a/build-all.ps1 +++ b/build-all.ps1 @@ -20,7 +20,7 @@ $solutionPaths = ( "modules/background-jobs", "modules/client-simulation", "abp_io", - "templates/module", + "templates/mvc-module", "templates/service", "templates/mvc", "samples/MicroserviceDemo" From 3fc8f26e352ae2fa663b4e4af61fe256dd38a1ce Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Sun, 5 May 2019 21:40:48 +0300 Subject: [PATCH 067/335] Use autoSave option instead of manually calling CurrentUnitOfWork.SaveChanges. --- .../Volo/Abp/Application/Services/AsyncCrudAppService.cs | 9 ++------- .../Volo/Abp/Application/Services/CrudAppService.cs | 8 ++------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs index bf769dc78b..3d633931b3 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs @@ -90,9 +90,7 @@ namespace Volo.Abp.Application.Services await CheckCreatePolicyAsync(); var entity = MapToEntity(input); - - await Repository.InsertAsync(entity); - await CurrentUnitOfWork.SaveChangesAsync(); + await Repository.InsertAsync(entity, autoSave: true); return MapToEntityDto(entity); } @@ -102,12 +100,9 @@ namespace Volo.Abp.Application.Services await CheckUpdatePolicyAsync(); var entity = await GetEntityByIdAsync(id); - //TODO: Check if input has id different than given id and normalize if it's default value, throw ex otherwise - MapToEntity(input, entity); - await Repository.UpdateAsync(entity); - await CurrentUnitOfWork.SaveChangesAsync(); + await Repository.UpdateAsync(entity, autoSave: true); return MapToEntityDto(entity); } diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs index 60017e918f..2750d699a4 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs @@ -86,9 +86,7 @@ namespace Volo.Abp.Application.Services CheckCreatePolicy(); var entity = MapToEntity(input); - - Repository.Insert(entity); - CurrentUnitOfWork.SaveChanges(); + Repository.Insert(entity, autoSave: true); return MapToEntityDto(entity); } @@ -98,10 +96,8 @@ namespace Volo.Abp.Application.Services CheckUpdatePolicy(); var entity = GetEntityById(id); - MapToEntity(input, entity); - Repository.Update(entity); - CurrentUnitOfWork.SaveChanges(); + Repository.Update(entity, autoSave: true); return MapToEntityDto(entity); } From cce3b8e2baca2b9b08295b75025ff9c1620af034 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 6 May 2019 14:13:59 +0800 Subject: [PATCH 068/335] The New command adds the output folder parameters. --- .../Abp/Cli/Commands/NewProjectCommand.cs | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs index 94a9181eb2..3f274d69cb 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading.Tasks; using Ionic.Zip; using Microsoft.Extensions.Logging; @@ -30,16 +30,18 @@ namespace Volo.Abp.Cli.Commands Logger.LogWarning("Project name is missing."); Logger.LogWarning(""); Logger.LogWarning("Usage:"); - Logger.LogWarning(" abp new [-t|--template] [-d|--database-provider]"); + Logger.LogWarning(" abp new [-t|--template] [-d|--database-provider] [-o|--output-folder]"); Logger.LogWarning(""); Logger.LogWarning("Options:"); Logger.LogWarning("-t|--template "); Logger.LogWarning("-d|--database-provider "); + Logger.LogWarning("-o|--output-folder "); Logger.LogWarning(""); Logger.LogWarning("Examples:"); Logger.LogWarning(" abp new Acme.BookStore"); Logger.LogWarning(" abp new Acme.BookStore -t mvc-module"); Logger.LogWarning(" abp new Acme.BookStore -t mvc -d mongodb"); + Logger.LogWarning(" abp new Acme.BookStore -t mvc -d mongodb -o d:\\project"); return; } @@ -54,15 +56,31 @@ namespace Volo.Abp.Cli.Commands ) ); + var outputFolder = commandLineArgs.Options.GetOrNull(Options.OutputFolder.Short, Options.OutputFolder.Long); + if (outputFolder != null) + { + if (!Directory.Exists(outputFolder)) + { + Directory.CreateDirectory(outputFolder); + } + + outputFolder = Path.GetFullPath(outputFolder); + } + else + { + outputFolder = Directory.GetCurrentDirectory(); + } + using (var templateFileStream = new MemoryStream(result.ZipContent)) { using (var templateZipFile = ZipFile.Read(templateFileStream)) { - templateZipFile.ExtractAll(Directory.GetCurrentDirectory(), ExtractExistingFileAction.Throw); + templateZipFile.ExtractAll(outputFolder, ExtractExistingFileAction.Throw); } } Logger.LogInformation($"Successfully created the project '{commandLineArgs.Target}'"); + Logger.LogInformation($"The output folder is: '{outputFolder}'"); } protected virtual DatabaseProvider GetDatabaseProviderOrNull(CommandLineArgs commandLineArgs) @@ -92,6 +110,12 @@ namespace Volo.Abp.Cli.Commands public const string Short = "d"; public const string Long = "database-provider"; } + + public static class OutputFolder + { + public const string Short = "o"; + public const string Long = "output-folder"; + } } } } \ No newline at end of file From ccc89803a1a1529376c496e277bd07ff6ecd4be5 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Mon, 6 May 2019 12:12:28 +0300 Subject: [PATCH 069/335] Added Add module command --- .../Volo/Abp/Cli/Commands/AddCommand.cs | 55 +++++++ .../Volo/Abp/Cli/Commands/AddCommandHelper.cs | 27 ++++ .../Volo/Abp/Cli/Commands/CommandSelector.cs | 10 +- .../{MainHelpCommand.cs => HelpCommand.cs} | 2 +- .../Abp/Cli/Commands/NewProjectCommand.cs | 8 +- .../Abp/ProjectModification/AddModuleArgs.cs | 26 ++++ .../Abp/ProjectModification/ModuleAdder.cs | 137 ++++++++++++++++++ .../ProjectModification/ProjectModuleAdder.cs | 13 ++ .../SolutionModuleAdder.cs | 13 ++ .../Volo/Abp/Modularity/IAbpModule.cs | 4 +- 10 files changed, 284 insertions(+), 11 deletions(-) create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddCommand.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddCommandHelper.cs rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/{MainHelpCommand.cs => HelpCommand.cs} (87%) create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/AddModuleArgs.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ProjectModuleAdder.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/SolutionModuleAdder.cs diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddCommand.cs new file mode 100644 index 0000000000..e5034725ba --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddCommand.cs @@ -0,0 +1,55 @@ +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using System.Threading.Tasks; +using Volo.Abp.Cli.Args; +using Volo.Abp.DependencyInjection; +using Volo.Abp.ProjectModification; + +namespace Volo.Abp.Cli.Commands +{ + public class AddCommand : IConsoleCommand, ITransientDependency + { + public ILogger Logger { get; set; } + + protected ModuleAdder ModuleAdder { get; } + + public AddCommand(ModuleAdder moduleAdder) + { + ModuleAdder = moduleAdder; + Logger = NullLogger.Instance; + } + + public async Task ExecuteAsync(CommandLineArgs commandLineArgs) + { + if (commandLineArgs.Target == null) + { + Logger.LogWarning("Module name is missing."); + AddCommandHelper.WriteUsage(Logger); + return; + } + + await ModuleAdder.AddModuleAsync( + new AddModuleArgs( + commandLineArgs.Target, + commandLineArgs.Options.GetOrNull(Options.Solution.Short, Options.Solution.Long), + commandLineArgs.Options.GetOrNull(Options.Project.Short, Options.Project.Long) + ) + ); + } + + public static class Options + { + public static class Solution + { + public const string Short = "s"; + public const string Long = "solution"; + } + + public static class Project + { + public const string Short = "p"; + public const string Long = "project"; + } + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddCommandHelper.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddCommandHelper.cs new file mode 100644 index 0000000000..0704ecdbf3 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddCommandHelper.cs @@ -0,0 +1,27 @@ +using Microsoft.Extensions.Logging; + +namespace Volo.Abp.Cli.Commands +{ + public static class AddCommandHelper + { + public static void WriteUsage(ILogger logger) + { + logger.LogWarning(""); + logger.LogWarning("'add' command is used to add a module to a solution or to a project."); + logger.LogWarning("Use in a solution folder to add a multi-package module to a solution."); + logger.LogWarning("Use in a project folder to add a single-package module to a project."); + logger.LogWarning(""); + logger.LogWarning("Usage:"); + logger.LogWarning(" abp add [-s|--solution] [-p|--project]"); + logger.LogWarning(""); + logger.LogWarning("Options:"); + logger.LogWarning(" -s|--solution Specify solution file explicitly."); + logger.LogWarning(" -p|--project Specify project file explicitly."); + logger.LogWarning(""); + logger.LogWarning("Examples:"); + logger.LogWarning(" abp add Volo.Abp.TenantManagement Adds tenant management module packages to the solution."); + logger.LogWarning(" abp add Volo.Abp.FluentValidation Adds a single module package to the project."); + logger.LogWarning(""); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs index 32268540a7..9bcc5ed859 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs @@ -9,14 +9,18 @@ namespace Volo.Abp.Cli.Commands public Type Select(CommandLineArgs commandLineArgs) { //TODO: Create options to define commands - //TODO: Get from dependency injection instead of new? if (commandLineArgs.Command == "new") { - return typeof(NewProjectCommand); + return typeof(NewCommand); } - return typeof(MainHelpCommand); + if (commandLineArgs.Command == "add") + { + return typeof(AddCommand); + } + + return typeof(HelpCommand); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/MainHelpCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/HelpCommand.cs similarity index 87% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/MainHelpCommand.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/HelpCommand.cs index 96f7132934..fdad2a445e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/MainHelpCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/HelpCommand.cs @@ -5,7 +5,7 @@ using Volo.Abp.DependencyInjection; namespace Volo.Abp.Cli.Commands { - public class MainHelpCommand : IConsoleCommand, ITransientDependency + public class HelpCommand : IConsoleCommand, ITransientDependency { public Task ExecuteAsync(CommandLineArgs commandLineArgs) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs index 3f274d69cb..c4ab4f6216 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs @@ -10,17 +10,17 @@ using Volo.Abp.ProjectBuilding.Building; namespace Volo.Abp.Cli.Commands { - public class NewProjectCommand : IConsoleCommand, ITransientDependency + public class NewCommand : IConsoleCommand, ITransientDependency { - public ILogger Logger { get; set; } + public ILogger Logger { get; set; } protected ProjectBuilder ProjectBuilder { get; } - public NewProjectCommand(ProjectBuilder projectBuilder) + public NewCommand(ProjectBuilder projectBuilder) { ProjectBuilder = projectBuilder; - Logger = NullLogger.Instance; + Logger = NullLogger.Instance; } public async Task ExecuteAsync(CommandLineArgs commandLineArgs) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/AddModuleArgs.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/AddModuleArgs.cs new file mode 100644 index 0000000000..eba87227f3 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/AddModuleArgs.cs @@ -0,0 +1,26 @@ +using JetBrains.Annotations; + +namespace Volo.Abp.ProjectModification +{ + public class AddModuleArgs + { + [NotNull] + public string ModuleName { get; set; } + + [CanBeNull] + public string SolutionFile { get; set; } + + [CanBeNull] + public string ProjectFile { get; set; } + + public AddModuleArgs( + [NotNull] string moduleName, + [CanBeNull] string solutionFile = null, + [CanBeNull] string projectFile = null) + { + ModuleName = Check.NotNullOrWhiteSpace(moduleName, nameof(moduleName)); + SolutionFile = solutionFile; + ProjectFile = projectFile; + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs new file mode 100644 index 0000000000..6b5017f882 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs @@ -0,0 +1,137 @@ +using JetBrains.Annotations; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Cli.Commands; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.ProjectModification +{ + public class ModuleAdder : ITransientDependency + { + public ILogger Logger { get; set; } + + protected ProjectModuleAdder ProjectModuleAdder { get; } + protected SolutionModuleAdder SolutionModuleAdder { get; } + + public ModuleAdder(ProjectModuleAdder projectModuleAdder, SolutionModuleAdder solutionModuleAdder) + { + ProjectModuleAdder = projectModuleAdder; + SolutionModuleAdder = solutionModuleAdder; + + Logger = NullLogger.Instance; + } + + public async Task AddModuleAsync(AddModuleArgs args) + { + ValidateArgs(args); + NormalizeArgs(args); + + if (args.ProjectFile.IsNullOrEmpty() && args.SolutionFile.IsNullOrEmpty()) + { + if (!TryToFillProjectOrSolutionName(args)) + { + Logger.LogWarning("Could not find any project (.csproj) or solution (.sln) file in the current directory!"); + AddCommandHelper.WriteUsage(Logger); + return; + } + } + + if (!args.ProjectFile.IsNullOrEmpty()) + { + await ProjectModuleAdder.AddAsync(args.ProjectFile, args.ModuleName); + } + + if (!args.SolutionFile.IsNullOrEmpty()) + { + await SolutionModuleAdder.AddAsync(args.SolutionFile, args.ModuleName); + } + } + + private bool TryToFillProjectOrSolutionName(AddModuleArgs args) + { + var projectFiles = FindFiles(Directory.GetCurrentDirectory(), ".csproj"); + if (projectFiles.Count == 1) + { + args.ProjectFile = projectFiles.First(); + return true; + } + + if (projectFiles.Count > 1) + { + Logger.LogWarning( + "There are multiple project (.csproj) files in the current directory. Please specify one of the files below:"); + foreach (var projectFile in projectFiles) + { + Logger.LogWarning("* " + projectFile); + } + + Logger.LogWarning("Example:"); + Logger.LogWarning($"abp add {args.ModuleName} -p {projectFiles[0]}"); + return false; + } + + var solutionFiles = FindFiles(Directory.GetCurrentDirectory(), ".sln"); + if (solutionFiles.Count == 1) + { + args.SolutionFile = solutionFiles.First(); + return true; + } + + if (solutionFiles.Count > 1) + { + Logger.LogWarning( + "There are multiple solution (.sln) files in the current directory. Please specify one of the files below:"); + foreach (var solutionFile in solutionFiles) + { + Logger.LogWarning("* " + solutionFile); + } + + Logger.LogWarning("Example:"); + Logger.LogWarning($"abp add {args.ModuleName} -s {solutionFiles[0]}"); + } + + return false; + } + + private void ValidateArgs(AddModuleArgs args) + { + if (!args.ProjectFile.IsNullOrEmpty() && + !args.SolutionFile.IsNullOrEmpty()) + { + throw new ArgumentException("Can not specify a solution name and project name together."); + } + } + + private void NormalizeArgs(AddModuleArgs args) + { + args.ProjectFile = NormalizePath(args.ProjectFile); + args.SolutionFile = NormalizePath(args.SolutionFile); + } + + private static string NormalizePath([CanBeNull] string path) + { + if (string.IsNullOrEmpty(path)) + { + return path; + } + + if (Path.IsPathRooted(path)) + { + return path; + } + + return Path.Combine(Directory.GetCurrentDirectory(), path); + } + + + private List FindFiles(string directory, string fileExtension) + { + throw new NotImplementedException(); + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ProjectModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ProjectModuleAdder.cs new file mode 100644 index 0000000000..1960da10a5 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ProjectModuleAdder.cs @@ -0,0 +1,13 @@ +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.ProjectModification +{ + public class ProjectModuleAdder : ITransientDependency + { + public async Task AddAsync(string projectFile, string moduleName) + { + + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/SolutionModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/SolutionModuleAdder.cs new file mode 100644 index 0000000000..c78099210c --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/SolutionModuleAdder.cs @@ -0,0 +1,13 @@ +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.ProjectModification +{ + public class SolutionModuleAdder : ITransientDependency + { + public async Task AddAsync(string solutionFile, string moduleName) + { + + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs index b58fdc8eed..32c8980c54 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs @@ -1,6 +1,4 @@ -using JetBrains.Annotations; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.DependencyInjection; +using Volo.Abp.DependencyInjection; namespace Volo.Abp.Modularity { From b74d703c0365bcc28d7a2d6fc846f768b51c971a Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Mon, 6 May 2019 12:27:16 +0300 Subject: [PATCH 070/335] Created empty login/logout commands and CliOptions. --- .../Volo.Abp.Cli.Core.csproj | 6 ++++ .../Volo/Abp/Cli/AbpCliCoreModule.cs | 10 ++++++ .../Volo/Abp/Cli/Args/CommandLineArgs.cs | 8 ++++- .../Volo/Abp/Cli/Auth/AuthService.cs | 18 +++++++++++ .../Volo/Abp/Cli/CliOptions.cs | 15 +++++++++ .../Volo/Abp/Cli/Commands/CommandSelector.cs | 24 +++++++------- .../Volo/Abp/Cli/Commands/LoginCommand.cs | 31 +++++++++++++++++++ .../Volo/Abp/Cli/Commands/LogoutCommand.cs | 27 ++++++++++++++++ 8 files changed, 125 insertions(+), 14 deletions(-) create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliOptions.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LogoutCommand.cs diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj index 07a488123c..df4d76cce5 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -24,4 +24,10 @@ + + + C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.SqlXml.dll + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs index 555fe14ca4..eaa7aa0175 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs @@ -1,4 +1,5 @@ using System.Text; +using Volo.Abp.Cli.Commands; using Volo.Abp.Domain; using Volo.Abp.Json; using Volo.Abp.Modularity; @@ -14,6 +15,15 @@ namespace Volo.Abp.Cli public override void ConfigureServices(ServiceConfigurationContext context) { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + + Configure(options => + { + options.Commands["help"] = typeof(HelpCommand); + options.Commands["new"] = typeof(NewCommand); + options.Commands["add"] = typeof(AddCommand); + options.Commands["login"] = typeof(LoginCommand); + options.Commands["logout"] = typeof(LogoutCommand); + }); } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs index 624c96afe5..5e1191c385 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/CommandLineArgs.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using System.Text; using JetBrains.Annotations; @@ -27,6 +28,11 @@ namespace Volo.Abp.Cli.Args return new CommandLineArgs(); } + public bool IsCommand(string command) + { + return string.Equals(Command, command, StringComparison.OrdinalIgnoreCase); + } + public override string ToString() { var sb = new StringBuilder(); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs new file mode 100644 index 0000000000..692e699e75 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs @@ -0,0 +1,18 @@ +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli.Auth +{ + public class AuthService : ITransientDependency + { + public async Task LoginAsync(string userName, string password) + { + + } + + public async Task LogoutAsync() + { + + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliOptions.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliOptions.cs new file mode 100644 index 0000000000..3885314e70 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliOptions.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; + +namespace Volo.Abp.Cli +{ + public class CliOptions + { + public Dictionary Commands { get; } + + public CliOptions() + { + Commands = new Dictionary(StringComparer.OrdinalIgnoreCase); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs index 9bcc5ed859..d3d3d7c736 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/CommandSelector.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using Microsoft.Extensions.Options; using Volo.Abp.Cli.Args; using Volo.Abp.DependencyInjection; @@ -6,21 +8,17 @@ namespace Volo.Abp.Cli.Commands { public class CommandSelector : ICommandSelector, ITransientDependency { - public Type Select(CommandLineArgs commandLineArgs) - { - //TODO: Create options to define commands + protected CliOptions Options { get; } - if (commandLineArgs.Command == "new") - { - return typeof(NewCommand); - } - - if (commandLineArgs.Command == "add") - { - return typeof(AddCommand); - } + public CommandSelector(IOptions options) + { + Options = options.Value; + } - return typeof(HelpCommand); + public Type Select(CommandLineArgs commandLineArgs) + { + return Options.Commands.GetOrDefault(commandLineArgs.Command) + ?? typeof(HelpCommand); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs new file mode 100644 index 0000000000..e1a215b201 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Volo.Abp.Cli.Args; +using Volo.Abp.Cli.Auth; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli.Commands +{ + public class LoginCommand : IConsoleCommand, ITransientDependency + { + public ILogger Logger { get; set; } + + protected AuthService AuthService { get; } + + public LoginCommand(AuthService authService) + { + AuthService = authService; + Logger = NullLogger.Instance; + } + + public async Task ExecuteAsync(CommandLineArgs commandLineArgs) + { + if (commandLineArgs.Target.IsNullOrEmpty()) + { + + } + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LogoutCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LogoutCommand.cs new file mode 100644 index 0000000000..342e52f529 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LogoutCommand.cs @@ -0,0 +1,27 @@ +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Volo.Abp.Cli.Args; +using Volo.Abp.Cli.Auth; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Cli.Commands +{ + public class LogoutCommand : IConsoleCommand, ITransientDependency + { + public ILogger Logger { get; set; } + + protected AuthService AuthService { get; } + + public LogoutCommand(AuthService authService) + { + AuthService = authService; + Logger = NullLogger.Instance; + } + + public Task ExecuteAsync(CommandLineArgs commandLineArgs) + { + return AuthService.LogoutAsync(); + } + } +} \ No newline at end of file From 09298d4d9aec515eac88ca30f56cb56793ad3e0a Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Mon, 6 May 2019 15:09:50 +0300 Subject: [PATCH 071/335] Redesign IdentityModelAuthenticationService --- ...delRemoteServiceHttpClientAuthenticator.cs | 9 +-- .../IIdentityModelAuthenticationService.cs | 17 +++++ .../IIdentityModelHttpClientAuthenticator.cs | 9 --- .../IdentityClientConfiguration.cs | 4 ++ ... => IdentityModelAuthenticationService.cs} | 71 +++++++++++-------- ...ntityModelHttpClientAuthenticateContext.cs | 25 ------- ...yModelHttpClientAuthenticatorExtensions.cs | 27 ------- 7 files changed, 67 insertions(+), 95 deletions(-) create mode 100644 framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelAuthenticationService.cs delete mode 100644 framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelHttpClientAuthenticator.cs rename framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/{IdentityModelRemoteServiceHttpClientAuthenticator.cs => IdentityModelAuthenticationService.cs} (55%) delete mode 100644 framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpClientAuthenticateContext.cs delete mode 100644 framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpClientAuthenticatorExtensions.cs diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs index e7b41784c7..91d1c4cb9b 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs @@ -13,11 +13,12 @@ namespace Volo.Abp.Http.Client.IdentityModel { public IHttpContextAccessor HttpContextAccessor { get; set; } - protected IIdentityModelHttpClientAuthenticator IdentityModelHttpClientAuthenticator { get; } + protected IIdentityModelAuthenticationService IdentityModelAuthenticationService { get; } - public IdentityModelRemoteServiceHttpClientAuthenticator(IIdentityModelHttpClientAuthenticator identityModelHttpClientAuthenticator) + public IdentityModelRemoteServiceHttpClientAuthenticator( + IIdentityModelAuthenticationService identityModelAuthenticationService) { - IdentityModelHttpClientAuthenticator = identityModelHttpClientAuthenticator; + IdentityModelAuthenticationService = identityModelAuthenticationService; } public async Task Authenticate(RemoteServiceHttpClientAuthenticateContext context) @@ -32,7 +33,7 @@ namespace Volo.Abp.Http.Client.IdentityModel } } - await IdentityModelHttpClientAuthenticator.AuthenticateAsync( + await IdentityModelAuthenticationService.TryAuthenticateAsync( context.Client, context.RemoteService.GetIdentityClient() ); diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelAuthenticationService.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelAuthenticationService.cs new file mode 100644 index 0000000000..4acfac2ad7 --- /dev/null +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelAuthenticationService.cs @@ -0,0 +1,17 @@ +using System.Net.Http; +using System.Threading.Tasks; +using JetBrains.Annotations; + +namespace Volo.Abp.IdentityModel +{ + //TODO: Re-consider this interface! + public interface IIdentityModelAuthenticationService + { + Task TryAuthenticateAsync( + [NotNull] HttpClient client, + string identityClientName = null); + + Task GetAccessTokenAsync( + IdentityClientConfiguration configuration); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelHttpClientAuthenticator.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelHttpClientAuthenticator.cs deleted file mode 100644 index 09a16735ff..0000000000 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelHttpClientAuthenticator.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Threading.Tasks; - -namespace Volo.Abp.IdentityModel -{ - public interface IIdentityModelHttpClientAuthenticator - { - Task AuthenticateAsync(IdentityModelHttpClientAuthenticateContext context); - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs index 9e891ccafa..35ca881f7f 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs @@ -77,12 +77,16 @@ namespace Volo.Abp.IdentityModel } public IdentityClientConfiguration( + string authority, + string scope, string clientId, string clientSecret, string grantType = OidcConstants.GrantTypes.ClientCredentials, string userName = null, string userPassword = null) { + this[nameof(Authority)] = authority; + this[nameof(Scope)] = scope; this[nameof(ClientId)] = clientId; this[nameof(ClientSecret)] = clientSecret; this[nameof(GrantType)] = grantType; diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs similarity index 55% rename from framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs rename to framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs index ad956aee1e..4f316ec357 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelRemoteServiceHttpClientAuthenticator.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs @@ -1,78 +1,89 @@ -using System; -using System.Collections.Generic; -using System.Net.Http.Headers; -using System.Threading.Tasks; -using IdentityModel; +using IdentityModel; using IdentityModel.Client; +using JetBrains.Annotations; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading.Tasks; using Volo.Abp.DependencyInjection; namespace Volo.Abp.IdentityModel { [Dependency(ReplaceServices = true)] - public class IdentityModelHttpClientAuthenticator : IIdentityModelHttpClientAuthenticator, ITransientDependency + public class IdentityModelAuthenticationService : IIdentityModelAuthenticationService, ITransientDependency { - public ILogger Logger { get; set; } + public ILogger Logger { get; set; } protected IdentityClientOptions ClientOptions { get; } - - public IdentityModelHttpClientAuthenticator( + + public IdentityModelAuthenticationService( IOptions options) { ClientOptions = options.Value; - Logger = NullLogger.Instance; + Logger = NullLogger.Instance; } - public async Task AuthenticateAsync(IdentityModelHttpClientAuthenticateContext context) + public async Task TryAuthenticateAsync( + [NotNull] HttpClient client, + string identityClientName = null) { - var accessToken = await GetAccessTokenFromServerOrNullAsync(context); - - if (accessToken != null) + var accessToken = await GetAccessTokenOrNullAsync(identityClientName); + if (accessToken == null) { - //TODO: "Bearer" should be configurable - context.Client.DefaultRequestHeaders.Authorization - = new AuthenticationHeaderValue("Bearer", accessToken); + return false; } - } - protected virtual async Task GetAccessTokenFromServerOrNullAsync(IdentityModelHttpClientAuthenticateContext context) - { - //TODO: Better logging + SetAccessToken(client, accessToken); + return true; - var configuration = GetClientConfiguration(context); + } + protected virtual async Task GetAccessTokenOrNullAsync(string identityClientName) + { + var configuration = GetClientConfiguration(identityClientName); if (configuration == null) { - Logger.LogWarning($"Could not find {nameof(IdentityClientConfiguration)} for {context.IdentityClientName}. Either define a configuration for {context.IdentityClientName} or set a default configuration."); + Logger.LogWarning($"Could not find {nameof(IdentityClientConfiguration)} for {identityClientName}. Either define a configuration for {identityClientName} or set a default configuration."); return null; } + return await GetAccessTokenAsync(configuration); + } + + public virtual async Task GetAccessTokenAsync(IdentityClientConfiguration configuration) + { var discoveryResponse = await GetDiscoveryResponse(configuration); if (discoveryResponse.IsError) { - Logger.LogError($"Could not retrieve the OpenId Connect discovery document! ErrorType: {discoveryResponse.ErrorType}. Error: {discoveryResponse.Error}"); - return null; + throw new AbpException($"Could not retrieve the OpenId Connect discovery document! ErrorType: {discoveryResponse.ErrorType}. Error: {discoveryResponse.Error}"); } var tokenResponse = await GetTokenResponse(discoveryResponse, configuration); if (tokenResponse.IsError) { - Logger.LogError($"Could not get token from the OpenId Connect server! ErrorType: {tokenResponse.ErrorType}. Error: {tokenResponse.Error}. ErrorDescription: {tokenResponse.ErrorDescription}. HttpStatusCode: {tokenResponse.HttpStatusCode}"); - return null; + throw new AbpException($"Could not get token from the OpenId Connect server! ErrorType: {tokenResponse.ErrorType}. Error: {tokenResponse.Error}. ErrorDescription: {tokenResponse.ErrorDescription}. HttpStatusCode: {tokenResponse.HttpStatusCode}"); } return tokenResponse.AccessToken; } - private IdentityClientConfiguration GetClientConfiguration(IdentityModelHttpClientAuthenticateContext context) + protected virtual void SetAccessToken(HttpClient client, string accessToken) + { + //TODO: "Bearer" should be configurable + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); + } + + private IdentityClientConfiguration GetClientConfiguration(string identityClientName = null) { - if (context.IdentityClientName.IsNullOrEmpty()) + if (identityClientName.IsNullOrEmpty()) { return ClientOptions.IdentityClients.Default; } - return ClientOptions.IdentityClients.GetOrDefault(context.IdentityClientName) ?? + return ClientOptions.IdentityClients.GetOrDefault(identityClientName) ?? ClientOptions.IdentityClients.Default; } diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpClientAuthenticateContext.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpClientAuthenticateContext.cs deleted file mode 100644 index 441129aee7..0000000000 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpClientAuthenticateContext.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Net.Http; -using JetBrains.Annotations; - -namespace Volo.Abp.IdentityModel -{ - public class IdentityModelHttpClientAuthenticateContext - { - public HttpClient Client { get; } - - /// - /// The identity client name configured with the . - /// - public string IdentityClientName { get; } - - /// object to be authenticated - /// The identity client name configured with the . - public IdentityModelHttpClientAuthenticateContext( - [NotNull] HttpClient client, - string identityClientName = null) - { - Client = Check.NotNull(client, nameof(client)); - IdentityClientName = identityClientName; - } - } -} diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpClientAuthenticatorExtensions.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpClientAuthenticatorExtensions.cs deleted file mode 100644 index c40b0d8398..0000000000 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpClientAuthenticatorExtensions.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Net.Http; -using System.Threading.Tasks; -using JetBrains.Annotations; - -namespace Volo.Abp.IdentityModel -{ - public static class IdentityModelHttpClientAuthenticatorExtensions - { - /// Authenticator object - /// object to be authenticated - /// The identity client name configured with the . - public static Task AuthenticateAsync( - [NotNull] this IIdentityModelHttpClientAuthenticator authenticator, - [NotNull] HttpClient client, - string identityClientName = null) - { - Check.NotNull(authenticator, nameof(authenticator)); - - return authenticator.AuthenticateAsync( - new IdentityModelHttpClientAuthenticateContext( - client, - identityClientName - ) - ); - } - } -} From 6d2d52095cbcbb97cddaa26bdd2a902504a1c449 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Mon, 6 May 2019 15:10:10 +0300 Subject: [PATCH 072/335] Implemented login --- .../Volo.Abp.Cli.Core.csproj | 1 + .../Volo/Abp/Cli/AbpCliCoreModule.cs | 4 ++- .../Volo/Abp/Cli/Auth/AuthService.cs | 31 ++++++++++++++++-- .../Volo/Abp/Cli/CliPaths.cs | 6 ++-- .../Volo/Abp/Cli/Commands/LoginCommand.cs | 32 +++++++++++++++++-- .../{NewProjectCommand.cs => NewCommand.cs} | 0 .../Volo/Abp/Cli/Utils/ConsoleHelper.cs | 26 +++++++++++++++ .../Abp/ProjectBuilding/AbpIoTemplateStore.cs | 2 +- .../Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs | 5 ++- .../src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs | 2 +- 10 files changed, 97 insertions(+), 12 deletions(-) rename framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/{NewProjectCommand.cs => NewCommand.cs} (100%) create mode 100644 framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ConsoleHelper.cs diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj index df4d76cce5..41cb647649 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -21,6 +21,7 @@ + diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs index eaa7aa0175..2dd39cdfce 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs @@ -1,6 +1,7 @@ using System.Text; using Volo.Abp.Cli.Commands; using Volo.Abp.Domain; +using Volo.Abp.IdentityModel; using Volo.Abp.Json; using Volo.Abp.Modularity; @@ -8,7 +9,8 @@ namespace Volo.Abp.Cli { [DependsOn( typeof(AbpDddDomainModule), - typeof(AbpJsonModule) + typeof(AbpJsonModule), + typeof(AbpIdentityModelModule) )] public class AbpCliCoreModule : AbpModule { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs index 692e699e75..68dfc52cf9 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs @@ -1,18 +1,43 @@ -using System.Threading.Tasks; +using System.IO; +using System.Text; +using System.Threading.Tasks; +using IdentityModel; using Volo.Abp.DependencyInjection; +using Volo.Abp.IdentityModel; +using Volo.Abp.IO; namespace Volo.Abp.Cli.Auth { public class AuthService : ITransientDependency { + protected IIdentityModelAuthenticationService AuthenticationService { get; } + + public AuthService(IIdentityModelAuthenticationService authenticationService) + { + AuthenticationService = authenticationService; + } + public async Task LoginAsync(string userName, string password) { + var accessToken = await AuthenticationService.GetAccessTokenAsync( + new IdentityClientConfiguration( + "https://localhost:44333", //TODO: Configure + "role email abpio_www", + "abp-cli", + "1q2w3e*", + OidcConstants.GrantTypes.Password, + userName, + password + ) + ); + File.WriteAllText(CliPaths.AccessToken, accessToken, Encoding.UTF8); } - public async Task LogoutAsync() + public Task LogoutAsync() { - + FileHelper.DeleteIfExists(CliPaths.AccessToken); + return Task.CompletedTask; } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs index b0296671b3..9c3f5a458c 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliPaths.cs @@ -5,8 +5,10 @@ namespace Volo.Abp.Cli { public static class CliPaths { - public static string TemplateCachePath => Path.Combine(AbpRootPath, "templates"); - public static string CliLogPath => Path.Combine(AbpRootPath, "cli", "logs"); + public static string TemplateCache => Path.Combine(AbpRootPath, "templates"); //TODO: Move somewhere else? + public static string Log => Path.Combine(AbpRootPath, "cli", "logs"); + public static string Root => Path.Combine(AbpRootPath, "cli"); + public static string AccessToken => Path.Combine(AbpRootPath, "cli", "access-token.bin"); private static readonly string AbpRootPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".abp"); } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs index e1a215b201..b0c96a7297 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs @@ -1,9 +1,10 @@ -using System; -using System.Threading.Tasks; -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Threading.Tasks; using Volo.Abp.Cli.Args; using Volo.Abp.Cli.Auth; +using Volo.Abp.Cli.Utils; using Volo.Abp.DependencyInjection; namespace Volo.Abp.Cli.Commands @@ -24,8 +25,33 @@ namespace Volo.Abp.Cli.Commands { if (commandLineArgs.Target.IsNullOrEmpty()) { + Logger.LogWarning("Username is missing."); + LogHelp(); + return; + } + Console.Write("Password: "); + var password = ConsoleHelper.ReadSecret(); + if (password.IsNullOrWhiteSpace()) + { + Logger.LogWarning("Password is missing."); + LogHelp(); + return; } + + await AuthService.LoginAsync(commandLineArgs.Target, password); + + Console.WriteLine($"Successfully logged in as '{commandLineArgs.Target}'"); + } + + private void LogHelp() + { + Logger.LogWarning(""); + Logger.LogWarning("Usage:"); + Logger.LogWarning(" abp login "); + Logger.LogWarning(""); + Logger.LogWarning("Example:"); + Logger.LogWarning(" abp login john"); } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs similarity index 100% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewProjectCommand.cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ConsoleHelper.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ConsoleHelper.cs new file mode 100644 index 0000000000..6e05e118d1 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ConsoleHelper.cs @@ -0,0 +1,26 @@ +using System; +using System.Text; + +namespace Volo.Abp.Cli.Utils +{ + public static class ConsoleHelper + { + public static string ReadSecret() + { + var sb = new StringBuilder(); + + while (true) + { + var keyInfo = Console.ReadKey(true); + if (keyInfo.Key == ConsoleKey.Enter) + { + break; + } + + sb.Append(keyInfo.KeyChar); + } + + return sb.ToString(); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs index 6f3956f604..4715d3558e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectBuilding/AbpIoTemplateStore.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.ProjectBuilding public async Task GetAsync(string templateName, string version) { - var localCacheFolder = Path.Combine(CliPaths.TemplateCachePath, version); + var localCacheFolder = Path.Combine(CliPaths.TemplateCache, version); DirectoryHelper.CreateIfNotExists(localCacheFolder); var localCacheFile = Path.Combine(localCacheFolder, templateName + ".zip"); diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs index 339041ef8a..7a3fbdc2bf 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/AbpCliModule.cs @@ -9,6 +9,9 @@ namespace Volo.Abp.Cli )] public class AbpCliModule : AbpModule { - + public override void ConfigureServices(ServiceConfigurationContext context) + { + + } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs index 02759655ff..0bcff277c6 100644 --- a/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs +++ b/framework/src/Volo.Abp.Cli/Volo/Abp/Cli/Program.cs @@ -14,7 +14,7 @@ namespace Volo.Abp.Cli .MinimumLevel.Information() .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) .Enrich.FromLogContext() - .WriteTo.File(Path.Combine(CliPaths.CliLogPath, "abp-cli-logs.txt")) + .WriteTo.File(Path.Combine(CliPaths.Log, "abp-cli-logs.txt")) .WriteTo.Console() .CreateLogger(); From f41808496a347594d1f0dfc946c902781627d671 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Mon, 6 May 2019 18:12:26 +0300 Subject: [PATCH 073/335] Update ModuleAdder.cs --- .../Volo/Abp/ProjectModification/ModuleAdder.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs index 6b5017f882..b0e5f2a353 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs @@ -55,13 +55,13 @@ namespace Volo.Abp.ProjectModification private bool TryToFillProjectOrSolutionName(AddModuleArgs args) { var projectFiles = FindFiles(Directory.GetCurrentDirectory(), ".csproj"); - if (projectFiles.Count == 1) + if (projectFiles.Length == 1) { args.ProjectFile = projectFiles.First(); return true; } - if (projectFiles.Count > 1) + if (projectFiles.Length > 1) { Logger.LogWarning( "There are multiple project (.csproj) files in the current directory. Please specify one of the files below:"); @@ -76,13 +76,13 @@ namespace Volo.Abp.ProjectModification } var solutionFiles = FindFiles(Directory.GetCurrentDirectory(), ".sln"); - if (solutionFiles.Count == 1) + if (solutionFiles.Length == 1) { args.SolutionFile = solutionFiles.First(); return true; } - if (solutionFiles.Count > 1) + if (solutionFiles.Length > 1) { Logger.LogWarning( "There are multiple solution (.sln) files in the current directory. Please specify one of the files below:"); @@ -129,9 +129,9 @@ namespace Volo.Abp.ProjectModification } - private List FindFiles(string directory, string fileExtension) + private string[] FindFiles(string directory, string fileExtension) { - throw new NotImplementedException(); + return Directory.GetFiles(directory, "*" + fileExtension); } } } From de330bb45994d40da15e95ba3246617c5f0c5f53 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Mon, 6 May 2019 18:51:42 +0300 Subject: [PATCH 074/335] Add missing Volo.Abp.FluentValidation to nuget packages. --- nupkg/common.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 100bfe3b89..5f6944b1a6 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -68,6 +68,7 @@ $projects = ( "framework/src/Volo.Abp.EventBus", "framework/src/Volo.Abp.EventBus.RabbitMQ", "framework/src/Volo.Abp.Features", + "framework/src/Volo.Abp.FluentValidation", "framework/src/Volo.Abp.Guids", "framework/src/Volo.Abp.HangFire", "framework/src/Volo.Abp.Http", From af6dcfb1f3019f796b313c8e76b116a036bb5255 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 7 May 2019 09:47:20 +0800 Subject: [PATCH 075/335] Replace IIdentityModelHttpClientAuthenticator with IIdentityModelAuthenticationService. fix #1098 --- .../ConsoleClientDemo/ClientDemoService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/MicroserviceDemo/applications/ConsoleClientDemo/ClientDemoService.cs b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ClientDemoService.cs index 1560c383d1..43a36383fd 100644 --- a/samples/MicroserviceDemo/applications/ConsoleClientDemo/ClientDemoService.cs +++ b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ClientDemoService.cs @@ -14,13 +14,13 @@ namespace ConsoleClientDemo { private readonly IIdentityUserAppService _userAppService; private readonly IProductAppService _productAppService; - private readonly IIdentityModelHttpClientAuthenticator _authenticator; + private readonly IIdentityModelAuthenticationService _authenticator; private readonly RemoteServiceOptions _remoteServiceOptions; public ClientDemoService( IIdentityUserAppService userAppService, IProductAppService productAppService, - IIdentityModelHttpClientAuthenticator authenticator, + IIdentityModelAuthenticationService authenticator, IOptions remoteServiceOptions) { _userAppService = userAppService; @@ -38,7 +38,7 @@ namespace ConsoleClientDemo /// /// Shows how to manually create an HttpClient and authenticate using the - /// IIdentityModelHttpClientAuthenticator service. + /// IIdentityModelAuthenticationService service. /// private async Task TestWithHttpClient() { @@ -49,7 +49,7 @@ namespace ConsoleClientDemo { using (var client = new HttpClient()) { - await _authenticator.AuthenticateAsync(client); + await _authenticator.TryAuthenticateAsync(client); var url = GetServerUrl() + "Test/Index"; @@ -75,7 +75,7 @@ namespace ConsoleClientDemo /// /// Shows how to use application service interfaces (IIdentityUserAppService in this sample) /// to call a remote service which is possible by the dynamic http client proxy system. - /// No need to use IIdentityModelHttpClientAuthenticator since the dynamic http client proxy + /// No need to use IIdentityModelAuthenticationService since the dynamic http client proxy /// system internally uses it. You just inject a service (IIdentityUserAppService) /// and call a method (GetListAsync) like a local method. /// @@ -104,7 +104,7 @@ namespace ConsoleClientDemo /// /// Shows how to use application service interfaces (IProductAppService in this sample) /// to call a remote service which is possible by the dynamic http client proxy system. - /// No need to use IIdentityModelHttpClientAuthenticator since the dynamic http client proxy + /// No need to use IIdentityModelAuthenticationService since the dynamic http client proxy /// system internally uses it. You just inject a service (IProductAppService) /// and call a method (GetListAsync) like a local method. /// From 7a175fde1631a357620c20663ad65d9db37f6cc9 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 8 May 2019 12:45:18 +0800 Subject: [PATCH 076/335] Fixes #1099. Stop encoding article summary --- .../src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml index c2aebc7192..6526c79ef1 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml @@ -166,7 +166,7 @@ @post.Title

    - @(GetShortContent(post.Content)) + @Html.Raw(GetShortContent(post.Content))