From b81b5f377cedfb17376c9a5e33f7a6e746902851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 19 Nov 2020 11:39:18 +0300 Subject: [PATCH 1/9] Refactored abp bundle service --- .../Abp/Cli/Bundling/BundleTypeDefinition.cs | 1 + .../Abp/Cli/Bundling/BundlingException.cs | 9 +- .../Volo/Abp/Cli/Bundling/BundlingService.cs | 96 ++++++++----------- .../Volo/Abp/Bundling/BundleDefinition.cs | 6 ++ 4 files changed, 53 insertions(+), 59 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundleTypeDefinition.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundleTypeDefinition.cs index 5fc9ecadeb..57500a1db5 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundleTypeDefinition.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundleTypeDefinition.cs @@ -5,6 +5,7 @@ namespace Volo.Abp.Cli.Bundling internal class BundleTypeDefinition { public int Level { get; set; } + public Type BundleContributerType { get; set; } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingException.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingException.cs index 31f40a2cd7..7bcdf55a73 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingException.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingException.cs @@ -1,10 +1,9 @@ -using System; - -namespace Volo.Abp.Cli.Bundling +namespace Volo.Abp.Cli.Bundling { - public class BundlingException : Exception + public class BundlingException : AbpException { - public BundlingException(string message) : base(message) + public BundlingException(string message) + : base(message) { } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index 001e33c5df..252454b082 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -1,5 +1,4 @@ -using Microsoft.CodeAnalysis.CSharp; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -40,7 +39,7 @@ namespace Volo.Abp.Cli.Bundling { new DotNetProjectInfo(string.Empty, projectFilePath, true) }; - + DotNetProjectBuilder.BuildProjects(projects, string.Empty); } @@ -63,11 +62,13 @@ namespace Volo.Abp.Cli.Bundling private BundleContext GetScriptContext(List bundleDefinitions) { var scriptContext = new BundleContext(); + foreach (var bundleDefinition in bundleDefinitions) { var contributer = CreateContributerInstance(bundleDefinition.BundleContributerType); contributer.AddScripts(scriptContext); } + scriptContext.Add("_framework/blazor.webassembly.js"); return scriptContext; } @@ -75,11 +76,13 @@ namespace Volo.Abp.Cli.Bundling private BundleContext GetStyleContext(List bundleDefinitions) { var styleContext = new BundleContext(); + foreach (var bundleDefinition in bundleDefinitions) { var contributer = CreateContributerInstance(bundleDefinition.BundleContributerType); contributer.AddStyles(styleContext); - }; + } + return styleContext; } @@ -102,9 +105,11 @@ namespace Volo.Abp.Cli.Bundling content = UpdatePlaceholders(content, StylePlaceholderStart, StylePlaceholderEnd, styleDefinitions); content = UpdatePlaceholders(content, ScriptPlaceholderStart, ScriptPlaceholderEnd, scriptDefinitions); - using var writer = new StreamWriter(htmlFilePath, false, fileEncoding); - await writer.WriteAsync(content); - await writer.FlushAsync(); + using (var writer = new StreamWriter(htmlFilePath, false, fileEncoding)) + { + await writer.WriteAsync(content); + await writer.FlushAsync(); + } } private string UpdatePlaceholders(string content, string placeholderStart, string placeholderEnd, string definitions) @@ -118,23 +123,21 @@ namespace Volo.Abp.Cli.Bundling private string GenerateStyleDefinitions(BundleContext context) { var builder = new StringBuilder(); + builder.AppendLine($"{StylePlaceholderStart}"); + foreach (var style in context.BundleDefinitions) { - if (style.AdditionalProperties != null && style.AdditionalProperties.Any()) - { - builder.Append($"\t"); - } - else + builder.Append($"\t"); + builder.Append($"{additionalProperty.Key}={additionalProperty.Value} "); } + + builder.AppendLine("/>"); } + builder.Append($"\t{StylePlaceholderEnd}"); return builder.ToString(); @@ -142,6 +145,8 @@ namespace Volo.Abp.Cli.Bundling private string GenerateScriptDefinitions(BundleContext context) { + //TODO: refactor as like GenerateStyleDefinitions + var builder = new StringBuilder(); builder.AppendLine($"{ScriptPlaceholderStart}"); foreach (var script in context.BundleDefinitions) @@ -167,27 +172,18 @@ namespace Volo.Abp.Cli.Bundling private IBundleContributer CreateContributerInstance(Type bundleContributerType) { - var instance = Activator.CreateInstance(bundleContributerType); - return instance.As(); + return (IBundleContributer) Activator.CreateInstance(bundleContributerType); } - private void ExecuteBundleContributers(List bundleDefinitions, BundleContext styleContext, BundleContext scriptContext) + private void FindBundleContributersRecursively( + Type module, + int level, + List bundleDefinitions) { - foreach (var bundleDefinition in bundleDefinitions) - { - var contributer = CreateContributerInstance(bundleDefinition.BundleContributerType); - contributer.AddStyles(styleContext); - contributer.AddScripts(scriptContext); - } - } + var bundleContributer = module.Assembly + .GetTypes() + .SingleOrDefault(t => t.IsAssignableTo()); - private void FindBundleContributersRecursively(Type module, int level, List bundleDefinitions) - { - var dependencyDescriptors = module - .GetCustomAttributes() - .OfType(); - - var bundleContributer = module.Assembly.GetTypes().SingleOrDefault(t => t.IsAssignableTo()); if (bundleContributer != null) { var definition = bundleDefinitions.SingleOrDefault(t => t.BundleContributerType == bundleContributer); @@ -208,6 +204,10 @@ namespace Volo.Abp.Cli.Bundling } } + var dependencyDescriptors = module + .GetCustomAttributes() + .OfType(); + foreach (var descriptor in dependencyDescriptors) { foreach (var dependedModuleType in descriptor.GetDependedTypes()) @@ -219,19 +219,10 @@ namespace Volo.Abp.Cli.Bundling private Type GetStartupModule(string assemblyPath) { - var assembly = Assembly.LoadFrom(assemblyPath); - return assembly.GetTypes().SingleOrDefault(IsAbpModule); - - static bool IsAbpModule(Type type) - { - var typeInfo = type.GetTypeInfo(); - - return - typeInfo.IsClass && - !typeInfo.IsAbstract && - !typeInfo.IsGenericType && - typeof(IAbpModule).GetTypeInfo().IsAssignableFrom(type); - } + return Assembly + .LoadFrom(assemblyPath) + .GetTypes() + .SingleOrDefault(AbpModule.IsAbpModule); } private string GetFrameworkFolderPath(string projectDirectory, string frameworkVersion) @@ -244,15 +235,12 @@ namespace Volo.Abp.Cli.Bundling var document = new XmlDocument(); document.Load(projectFilePath); var sdk = document.DocumentElement.GetAttribute("Sdk"); - if (sdk == SupportedWebAssemblyProjectType) - { - var frameworkVersion = document.SelectSingleNode("//TargetFramework").InnerText; - return frameworkVersion; - } - else + if (sdk != SupportedWebAssemblyProjectType) { throw new BundlingException($"Unsupported project type. Project type must be {SupportedWebAssemblyProjectType}."); } + + return document.SelectSingleNode("//TargetFramework").InnerText; } private string GetAssemblyFilePath(string directory, string frameworkVersion, string projectFileName) diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleDefinition.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleDefinition.cs index 2a410bce76..7a3bf315be 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleDefinition.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleDefinition.cs @@ -5,6 +5,12 @@ namespace Volo.Abp.Bundling public class BundleDefinition { public string Source { get; set; } + public Dictionary AdditionalProperties { get; set; } + + public BundleDefinition() + { + AdditionalProperties = new Dictionary(); + } } } From bd2d8bd7dc60e06879c45960d37dea0bfc270ad5 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Thu, 19 Nov 2020 16:33:08 +0300 Subject: [PATCH 2/9] improve exception message. --- .../Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index 252454b082..9b0729b000 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -28,7 +28,7 @@ namespace Volo.Abp.Cli.Bundling var projectFiles = Directory.GetFiles(directory, "*.csproj"); if (!projectFiles.Any()) { - throw new BundlingException("No project file found in the directory"); + throw new BundlingException("No project file found in the directory. The working directory must have a Blazor project file."); } var projectFilePath = projectFiles[0]; From ef8646f4bad372cc106ae8bf16a9f945385c75a3 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Thu, 19 Nov 2020 16:34:10 +0300 Subject: [PATCH 3/9] throw exception if a module contains multiple bundle contributors. --- .../Volo/Abp/Cli/Bundling/BundlingService.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index 9b0729b000..3552c09a72 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -180,12 +180,19 @@ namespace Volo.Abp.Cli.Bundling int level, List bundleDefinitions) { - var bundleContributer = module.Assembly + var bundleContributers = module.Assembly .GetTypes() - .SingleOrDefault(t => t.IsAssignableTo()); + .Where(t => t.IsAssignableTo()) + .ToList(); - if (bundleContributer != null) + if (bundleContributers.Count > 1) { + throw new BundlingException($"Each project must contain only one class implementing {nameof(IBundleContributor)}"); + } + + if (bundleContributers.Any()) + { + var bundleContributer = bundleContributers[0]; var definition = bundleDefinitions.SingleOrDefault(t => t.BundleContributerType == bundleContributer); if (definition != null) { From 69ce417b2ba9251096941f066f5843794cc52342 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Thu, 19 Nov 2020 16:35:40 +0300 Subject: [PATCH 4/9] use spaces instead of tabs and reduce if usage. --- .../Volo/Abp/Cli/Bundling/BundlingService.cs | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index 3552c09a72..d74f943c34 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -128,7 +128,7 @@ namespace Volo.Abp.Cli.Bundling foreach (var style in context.BundleDefinitions) { - builder.Append($"\t"); } - builder.Append($"\t{StylePlaceholderEnd}"); + builder.Append($" {StylePlaceholderEnd}"); return builder.ToString(); } private string GenerateScriptDefinitions(BundleContext context) { - //TODO: refactor as like GenerateStyleDefinitions - var builder = new StringBuilder(); builder.AppendLine($"{ScriptPlaceholderStart}"); foreach (var script in context.BundleDefinitions) { - if (script.AdditionalProperties != null && script.AdditionalProperties.Any()) + builder.Append($" "); - } - else - { - builder.AppendLine($"\t"); + builder.Append($"{additionalProperty.Key}={additionalProperty.Value} "); } + builder.AppendLine(">"); } - builder.Append($"\t{ScriptPlaceholderEnd}"); + builder.Append($" {ScriptPlaceholderEnd}"); return builder.ToString(); } From 5cce0bec0c27f75ceb68a4a09231334e2a285563 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Thu, 19 Nov 2020 16:36:24 +0300 Subject: [PATCH 5/9] typo fix. --- ...ndleContributer.cs => BasicThemeBundleContributor.cs} | 2 +- ...gBundleContributer.cs => ThemingBundleContributor.cs} | 2 +- ...uter.cs => ComponentsWebAssemblyBundleContributor.cs} | 2 +- ...dleContributer.cs => BlazoriseUIBundleContributor.cs} | 2 +- .../Volo/Abp/Cli/Bundling/BundlingService.cs | 4 ++-- .../src/Volo.Abp.Core/Volo/Abp/Bundling/BundleContext.cs | 9 ++++++--- .../{IBundleContributer.cs => IBundleContributor.cs} | 2 +- ...r.cs => IdentityModelWebAssemblyBundleContributor.cs} | 2 +- ...eContributer.cs => MyProjectNameBundleContributor.cs} | 2 +- 9 files changed, 15 insertions(+), 12 deletions(-) rename framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/{BasicThemeBundleContributer.cs => BasicThemeBundleContributor.cs} (85%) rename framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/{ThemingBundleContributer.cs => ThemingBundleContributor.cs} (92%) rename framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/{ComponentsWebAssemblyBundleContributer.cs => ComponentsWebAssemblyBundleContributor.cs} (81%) rename framework/src/Volo.Abp.BlazoriseUI/{BlazoriseUIBundleContributer.cs => BlazoriseUIBundleContributor.cs} (89%) rename framework/src/Volo.Abp.Core/Volo/Abp/Bundling/{IBundleContributer.cs => IBundleContributor.cs} (78%) rename framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/{IdentityModelWebAssemblyBundleContributer.cs => IdentityModelWebAssemblyBundleContributor.cs} (82%) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/{MyProjectNameBundleContributer.cs => MyProjectNameBundleContributor.cs} (79%) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributer.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs similarity index 85% rename from framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributer.cs rename to framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs index adfdf9d503..edef97eb52 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributer.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs @@ -2,7 +2,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme { - public class BasicThemeBundleContributer : IBundleContributer + public class BasicThemeBundleContributor : IBundleContributor { public void AddScripts(BundleContext context) { diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributer.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributor.cs similarity index 92% rename from framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributer.cs rename to framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributor.cs index 8476190b59..70382a7dba 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributer.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ThemingBundleContributor.cs @@ -2,7 +2,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming { - public class ThemingBundleContributer : IBundleContributer + public class ThemingBundleContributor : IBundleContributor { public void AddScripts(BundleContext context) { diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributer.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributor.cs similarity index 81% rename from framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributer.cs rename to framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributor.cs index 5bab349483..9f05ff24d1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributer.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ComponentsWebAssemblyBundleContributor.cs @@ -2,7 +2,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly { - public class ComponentsWebAssemblyBundleContributer : IBundleContributer + public class ComponentsWebAssemblyBundleContributor : IBundleContributor { public void AddScripts(BundleContext context) { diff --git a/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributer.cs b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributor.cs similarity index 89% rename from framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributer.cs rename to framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributor.cs index 2a26fe6dec..5dcc51c76a 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributer.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUIBundleContributor.cs @@ -2,7 +2,7 @@ namespace Volo.Abp.BlazoriseUI { - public class BlazoriseUIBundleContributer : IBundleContributer + public class BlazoriseUIBundleContributor : IBundleContributor { public void AddScripts(BundleContext context) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index d74f943c34..698b0978c2 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -161,9 +161,9 @@ namespace Volo.Abp.Cli.Bundling return builder.ToString(); } - private IBundleContributer CreateContributerInstance(Type bundleContributerType) + private IBundleContributor CreateContributerInstance(Type bundleContributerType) { - return (IBundleContributer) Activator.CreateInstance(bundleContributerType); + return (IBundleContributor)Activator.CreateInstance(bundleContributerType); } private void FindBundleContributersRecursively( diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleContext.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleContext.cs index e30d6d9b3f..69f6e8d9e9 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleContext.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/BundleContext.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; namespace Volo.Abp.Bundling { @@ -17,9 +16,13 @@ namespace Volo.Abp.Bundling var bundleDefinition = new BundleDefinition { Source = source, - AdditionalProperties = additionalProperties }; + if (additionalProperties != null) + { + bundleDefinition.AdditionalProperties = additionalProperties; + } + BundleDefinitions.AddIfNotContains((item) => item.Source == bundleDefinition.Source, () => bundleDefinition); } } diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributer.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributor.cs similarity index 78% rename from framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributer.cs rename to framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributor.cs index bca0f62eb6..5388070cbd 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributer.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Bundling/IBundleContributor.cs @@ -1,6 +1,6 @@ namespace Volo.Abp.Bundling { - public interface IBundleContributer + public interface IBundleContributor { void AddScripts(BundleContext context); void AddStyles(BundleContext context); diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributer.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributor.cs similarity index 82% rename from framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributer.cs rename to framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributor.cs index cc4cfc3308..7ee8c8108f 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributer.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/IdentityModelWebAssemblyBundleContributor.cs @@ -2,7 +2,7 @@ namespace Volo.Abp.Http.Client.IdentityModel.WebAssembly { - public class IdentityModelWebAssemblyBundleContributer : IBundleContributer + public class IdentityModelWebAssemblyBundleContributor : IBundleContributor { public void AddScripts(BundleContext context) { diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributor.cs similarity index 79% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributer.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributor.cs index f2f904314b..a30dbc8f78 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributer.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributor.cs @@ -2,7 +2,7 @@ namespace MyCompanyName.MyProjectName.Blazor { - public class MyProjectNameBundleContributer : IBundleContributer + public class MyProjectNameBundleContributor : IBundleContributor { public void AddScripts(BundleContext context) { From 16f34de5392e6e3ea3f652299958161058f25c79 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Thu, 19 Nov 2020 16:36:43 +0300 Subject: [PATCH 6/9] style fix. --- .../wwwroot/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html index de63af374c..c11a257814 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html @@ -8,14 +8,14 @@ - - - - - - - - + + + + + + + + From 2cb2a3e370a9f435554e4c351fbb0afff1085943 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Thu, 19 Nov 2020 18:41:17 +0300 Subject: [PATCH 7/9] document typo fixes --- docs/en/UI/Blazor/Global-Scripts-Styles.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/UI/Blazor/Global-Scripts-Styles.md b/docs/en/UI/Blazor/Global-Scripts-Styles.md index 561eed27f6..a9a69c76d0 100644 --- a/docs/en/UI/Blazor/Global-Scripts-Styles.md +++ b/docs/en/UI/Blazor/Global-Scripts-Styles.md @@ -4,9 +4,9 @@ Some modules may require additional styles or scripts that need to be referenced To update script & style references without worrying about dependencies, ordering, etc in a project, you can use the [bundle command](../../CLI.md#bundle). -You can also add custom styles and scripts and let ABP manage them for you. In your Blazor project, you can create a class implementing `IBundleContributer` interface. +You can also add custom styles and scripts and let ABP manage them for you. In your Blazor project, you can create a class implementing `IBundleContributor` interface. -`IBundleContributer` interface contains two methods. +`IBundleContributor` interface contains two methods. * `AddScripts(...)` * `AddStyles(...)` @@ -17,7 +17,7 @@ Both methods get `BundleContext` as a parameter. You can add scripts and styles ```csharp namespace MyProject.Blazor { - public class MyProjectBundleContributer : IBundleContributer + public class MyProjectBundleContributor : IBundleContributor { public void AddScripts(BundleContext context) { @@ -33,6 +33,6 @@ namespace MyProject.Blazor } ``` -> There is a BundleContributer class implementing `IBundleContributer` interface coming by default with the startup templates. So, most of the time, you don't need to add it manually. +> There is a BundleContributor class implementing `IBundleContributor` interface coming by default with the startup templates. So, most of the time, you don't need to add it manually. > Bundle command adds style and script references individually. Bundling and minification support will be added to incoming releases. \ No newline at end of file From 90243f486b027fb0b47a008968065d459b08ab9c Mon Sep 17 00:00:00 2001 From: Mladen Macanovic Date: Fri, 20 Nov 2020 10:11:35 +0100 Subject: [PATCH 8/9] Multiline notification message --- .../Volo.Abp.BlazoriseUI/Components/UiNotificationAlert.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/UiNotificationAlert.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/UiNotificationAlert.razor index 349eee2c40..8edd037e15 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/UiNotificationAlert.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/UiNotificationAlert.razor @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From b13caf3d5df8f8815860ecf7bb36a6957ad217da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 21 Nov 2020 21:28:15 +0300 Subject: [PATCH 9/9] Create Domain-Driven-Design-Implementation-Guide.md --- docs/en/Domain-Driven-Design-Implementation-Guide.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/en/Domain-Driven-Design-Implementation-Guide.md diff --git a/docs/en/Domain-Driven-Design-Implementation-Guide.md b/docs/en/Domain-Driven-Design-Implementation-Guide.md new file mode 100644 index 0000000000..f2bc6d03f9 --- /dev/null +++ b/docs/en/Domain-Driven-Design-Implementation-Guide.md @@ -0,0 +1,3 @@ +# Implementing Domain Driven Design + +TODO \ No newline at end of file