From 2f672afa540633fcc778526f6f9a394129dc4ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Sun, 21 Nov 2021 23:25:57 +0300 Subject: [PATCH] use file-scoped namespacing for basicTheme module --- ...NetCoreComponentsServerBasicThemeModule.cs | 63 +++-- .../BasicThemeToolbarContributor.cs | 19 +- .../Bundling/BlazorBasicThemeBundles.cs | 21 +- .../BlazorBasicThemeScriptContributor.cs | 9 +- .../BlazorBasicThemeStyleContributor.cs | 13 +- .../Themes/Basic/LoginDisplay.razor.cs | 37 ++- ...AspNetCoreComponentsWebBasicThemeModule.cs | 17 +- .../Basic/FirstLevelNavMenuItem.razor.cs | 47 ++-- .../Themes/Basic/MainLayout.razor.cs | 43 ++- .../Themes/Basic/NavMenu.razor.cs | 47 ++-- .../Themes/Basic/NavToolbar.razor.cs | 67 +++-- .../Basic/SecondLevelNavMenuItem.razor.cs | 47 ++-- ...reComponentsWebAssemblyBasicThemeModule.cs | 33 ++- .../BasicThemeBundleContributor.cs | 17 +- .../BasicThemeToolbarContributor.cs | 31 ++- .../Themes/Basic/LoginDisplay.razor.cs | 93 ++++--- .../AbpAspNetCoreMvcUIBasicThemeModule.cs | 97 ++++--- .../BasicTheme.cs | 33 ++- .../Bundling/BasicThemeBundles.cs | 21 +- .../BasicThemeGlobalScriptContributor.cs | 13 +- .../BasicThemeGlobalStyleContributor.cs | 11 +- .../Brand/MainNavbarBrandViewComponent.cs | 11 +- .../MainNavbar/MainNavbarViewComponent.cs | 11 +- .../Menu/MainNavbarMenuViewComponent.cs | 25 +- .../PageAlerts/PageAlertsViewComponent.cs | 23 +- .../LanguageSwitchViewComponent.cs | 75 +++--- .../LanguageSwitchViewComponentModel.cs | 13 +- .../Toolbar/MainNavbarToolbarViewComponent.cs | 25 +- .../Toolbar/UserMenu/UserMenuViewComponent.cs | 25 +- .../BasicThemeMainTopToolbarContributor.cs | 43 ++- .../AbpBasicThemeInstallerModule.cs | 23 +- .../BasicThemeInstallerPipelineBuilder.cs | 15 +- ...AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs | 91 ++++--- ...pAspNetCoreMvcUiBootstrapDemoTestModule.cs | 15 +- .../Bootstrap/Demo/Components/Card_Tests.cs | 15 +- .../Mvc/UI/Bootstrap/Demo/TestStartup.cs | 21 +- .../AbpAspNetCoreMvcUiBootstrapDemoModule.cs | 37 ++- .../Pages/Components/Alerts.cshtml.cs | 11 +- .../Pages/Components/Badges.cshtml.cs | 11 +- .../Pages/Components/Blockquotes.cshtml.cs | 11 +- .../Pages/Components/Borders.cshtml.cs | 11 +- .../Pages/Components/Breadcrumbs.cshtml.cs | 11 +- .../Pages/Components/ButtonGroups.cshtml.cs | 11 +- .../Pages/Components/Buttons.cshtml.cs | 11 +- .../Pages/Components/Cards.cshtml.cs | 11 +- .../Pages/Components/Carousel.cshtml.cs | 11 +- .../Pages/Components/Collapse.cshtml.cs | 11 +- .../Pages/Components/Dropdowns.cshtml.cs | 33 ++- .../Pages/Components/DynamicForms.cshtml.cs | 249 +++++++++--------- .../Pages/Components/FormElements.cshtml.cs | 89 ++++--- .../Pages/Components/Grids.cshtml.cs | 11 +- .../Pages/Components/ListGroup.cshtml.cs | 11 +- .../Pages/Components/Modals.cshtml.cs | 11 +- .../Pages/Components/Navs.cshtml.cs | 11 +- .../Pages/Components/Paginator.cshtml.cs | 15 +- .../Pages/Components/Popovers.cshtml.cs | 11 +- .../Pages/Components/ProgressBars.cshtml.cs | 11 +- .../Pages/Components/Tables.cshtml.cs | 11 +- .../Pages/Components/Tabs.cshtml.cs | 11 +- .../Pages/Components/Tooltips.cshtml.cs | 11 +- .../Pages/Index.cshtml.cs | 11 +- .../Program.cs | 67 +++-- .../Startup.cs | 19 +- .../AbpAspNetCoreMvcUiThemeBasicDemoModule.cs | 73 +++-- .../Menus/BasicThemeDemoMenuContributor.cs | 37 ++- .../Menus/BasicThemeDemoMenus.cs | 65 +++-- .../Pages/Components/Alerts/Index.cshtml.cs | 11 +- .../Pages/Components/Badges/Index.cshtml.cs | 11 +- .../Pages/Components/Borders/Index.cshtml.cs | 11 +- .../Components/Breadcrumbs/Index.cshtml.cs | 11 +- .../Components/ButtonGroups/Index.cshtml.cs | 11 +- .../Pages/Components/Buttons/Index.cshtml.cs | 11 +- .../Pages/Components/Cards/Index.cshtml.cs | 11 +- .../Pages/Components/Carousel/Index.cshtml.cs | 11 +- .../Pages/Components/Collapse/Index.cshtml.cs | 11 +- .../Components/Dropdowns/Index.cshtml.cs | 11 +- .../Components/DynamicForms/Index.cshtml.cs | 11 +- .../Components/FormElements/Index.cshtml.cs | 11 +- .../Pages/Components/Grids/Index.cshtml.cs | 11 +- .../Pages/Components/Index.cshtml.cs | 23 +- .../Components/ListGroups/Index.cshtml.cs | 11 +- .../Pages/Components/Modals/Index.cshtml.cs | 11 +- .../Pages/Components/Navbars/Index.cshtml.cs | 11 +- .../Pages/Components/Navs/Index.cshtml.cs | 11 +- .../Components/Paginator/Index.cshtml.cs | 15 +- .../Pages/Components/Popovers/Index.cshtml.cs | 11 +- .../Components/ProgressBars/Index.cshtml.cs | 11 +- .../Pages/Components/Tables/Index.cshtml.cs | 11 +- .../Pages/Components/Tabs/Index.cshtml.cs | 11 +- .../Pages/Components/Tooltips/Index.cshtml.cs | 11 +- .../Pages/Index.cshtml.cs | 11 +- .../Program.cs | 67 +++-- .../Startup.cs | 21 +- 93 files changed, 1200 insertions(+), 1293 deletions(-) diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/AbpAspNetCoreComponentsServerBasicThemeModule.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/AbpAspNetCoreComponentsServerBasicThemeModule.cs index a374b93279..f1be56cf65 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/AbpAspNetCoreComponentsServerBasicThemeModule.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/AbpAspNetCoreComponentsServerBasicThemeModule.cs @@ -7,41 +7,40 @@ using Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.Modularity; -namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme +namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme; + +[DependsOn( + typeof(AbpAspNetCoreComponentsWebBasicThemeModule), + typeof(AbpAspNetCoreComponentsServerThemingModule) + )] +public class AbpAspNetCoreComponentsServerBasicThemeModule : AbpModule { - [DependsOn( - typeof(AbpAspNetCoreComponentsWebBasicThemeModule), - typeof(AbpAspNetCoreComponentsServerThemingModule) - )] - public class AbpAspNetCoreComponentsServerBasicThemeModule : AbpModule + public override void ConfigureServices(ServiceConfigurationContext context) { - public override void ConfigureServices(ServiceConfigurationContext context) + Configure(options => + { + options.Contributors.Add(new BasicThemeToolbarContributor()); + }); + + Configure(options => { - Configure(options => - { - options.Contributors.Add(new BasicThemeToolbarContributor()); - }); - - Configure(options => - { - options - .StyleBundles - .Add(BlazorBasicThemeBundles.Styles.Global, bundle => - { - bundle - .AddBaseBundles(BlazorStandardBundles.Styles.Global) - .AddContributors(typeof(BlazorBasicThemeStyleContributor)); - }); + options + .StyleBundles + .Add(BlazorBasicThemeBundles.Styles.Global, bundle => + { + bundle + .AddBaseBundles(BlazorStandardBundles.Styles.Global) + .AddContributors(typeof(BlazorBasicThemeStyleContributor)); + }); - options - .ScriptBundles - .Add(BlazorBasicThemeBundles.Scripts.Global, bundle => - { - bundle - .AddBaseBundles(BlazorStandardBundles.Scripts.Global) - .AddContributors(typeof(BlazorBasicThemeScriptContributor)); - }); - }); - } + options + .ScriptBundles + .Add(BlazorBasicThemeBundles.Scripts.Global, bundle => + { + bundle + .AddBaseBundles(BlazorStandardBundles.Scripts.Global) + .AddContributors(typeof(BlazorBasicThemeScriptContributor)); + }); + }); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/BasicThemeToolbarContributor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/BasicThemeToolbarContributor.cs index 4e816c9642..13a93d9f77 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/BasicThemeToolbarContributor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/BasicThemeToolbarContributor.cs @@ -2,19 +2,18 @@ using Volo.Abp.AspNetCore.Components.Server.BasicTheme.Themes.Basic; using Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; -namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme +namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme; + +public class BasicThemeToolbarContributor : IToolbarContributor { - public class BasicThemeToolbarContributor : IToolbarContributor + public Task ConfigureToolbarAsync(IToolbarConfigurationContext context) { - public Task ConfigureToolbarAsync(IToolbarConfigurationContext context) + if (context.Toolbar.Name == StandardToolbars.Main) { - if (context.Toolbar.Name == StandardToolbars.Main) - { - context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitch))); - context.Toolbar.Items.Add(new ToolbarItem(typeof(LoginDisplay))); - } - - return Task.CompletedTask; + context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitch))); + context.Toolbar.Items.Add(new ToolbarItem(typeof(LoginDisplay))); } + + return Task.CompletedTask; } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeBundles.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeBundles.cs index 86ed9686ed..df0df9a4da 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeBundles.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeBundles.cs @@ -1,15 +1,14 @@ -namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Bundling +namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Bundling; + +public class BlazorBasicThemeBundles { - public class BlazorBasicThemeBundles + public static class Styles { - public static class Styles - { - public static string Global = "Blazor.BasicTheme.Global"; - } + public static string Global = "Blazor.BasicTheme.Global"; + } - public static class Scripts - { - public static string Global = "Blazor.BasicTheme.Global"; - } + public static class Scripts + { + public static string Global = "Blazor.BasicTheme.Global"; } -} \ No newline at end of file +} diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeScriptContributor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeScriptContributor.cs index 85eb69b6f7..e56191ad24 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeScriptContributor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeScriptContributor.cs @@ -1,9 +1,8 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Bundling +namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Bundling; + +public class BlazorBasicThemeScriptContributor : BundleContributor { - public class BlazorBasicThemeScriptContributor : BundleContributor - { - } -} \ No newline at end of file +} diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeStyleContributor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeStyleContributor.cs index e0fe950038..2e2f212e6f 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeStyleContributor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Bundling/BlazorBasicThemeStyleContributor.cs @@ -1,13 +1,12 @@ using System.Collections.Generic; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Bundling +namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Bundling; + +public class BlazorBasicThemeStyleContributor : BundleContributor { - public class BlazorBasicThemeStyleContributor : BundleContributor + public override void ConfigureBundle(BundleConfigurationContext context) { - public override void ConfigureBundle(BundleConfigurationContext context) - { - context.Files.AddIfNotContains("/_content/Volo.Abp.AspNetCore.Components.Web.BasicTheme/libs/abp/css/theme.css"); - } + context.Files.AddIfNotContains("/_content/Volo.Abp.AspNetCore.Components.Web.BasicTheme/libs/abp/css/theme.css"); } -} \ No newline at end of file +} diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor.cs index cd5ea652e9..84696d7f29 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.BasicTheme/Themes/Basic/LoginDisplay.razor.cs @@ -4,30 +4,29 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Routing; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Themes.Basic +namespace Volo.Abp.AspNetCore.Components.Server.BasicTheme.Themes.Basic; + +public partial class LoginDisplay : IDisposable { - public partial class LoginDisplay : IDisposable - { - [Inject] - protected IMenuManager MenuManager { get; set; } + [Inject] + protected IMenuManager MenuManager { get; set; } - protected ApplicationMenu Menu { get; set; } + protected ApplicationMenu Menu { get; set; } - protected override async Task OnInitializedAsync() - { - Menu = await MenuManager.GetAsync(StandardMenus.User); + protected override async Task OnInitializedAsync() + { + Menu = await MenuManager.GetAsync(StandardMenus.User); - Navigation.LocationChanged += OnLocationChanged; - } + Navigation.LocationChanged += OnLocationChanged; + } - protected virtual void OnLocationChanged(object sender, LocationChangedEventArgs e) - { - InvokeAsync(StateHasChanged); - } + protected virtual void OnLocationChanged(object sender, LocationChangedEventArgs e) + { + InvokeAsync(StateHasChanged); + } - public void Dispose() - { - Navigation.LocationChanged -= OnLocationChanged; - } + public void Dispose() + { + Navigation.LocationChanged -= OnLocationChanged; } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/AbpAspNetCoreComponentsWebBasicThemeModule.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/AbpAspNetCoreComponentsWebBasicThemeModule.cs index ac85029be5..f20432c665 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/AbpAspNetCoreComponentsWebBasicThemeModule.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/AbpAspNetCoreComponentsWebBasicThemeModule.cs @@ -1,13 +1,12 @@ using Volo.Abp.AspNetCore.Components.Web.Theming; using Volo.Abp.Modularity; -namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme +namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme; + +[DependsOn( + typeof(AbpAspNetCoreComponentsWebThemingModule) + )] +public class AbpAspNetCoreComponentsWebBasicThemeModule : AbpModule { - [DependsOn( - typeof(AbpAspNetCoreComponentsWebThemingModule) - )] - public class AbpAspNetCoreComponentsWebBasicThemeModule : AbpModule - { - - } -} \ No newline at end of file + +} diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor.cs index 1ea64afc72..4cdd0ec8a4 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor.cs @@ -3,36 +3,35 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Routing; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic +namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic; + +public partial class FirstLevelNavMenuItem : IDisposable { - public partial class FirstLevelNavMenuItem : IDisposable - { - [Inject] private NavigationManager NavigationManager { get; set; } + [Inject] private NavigationManager NavigationManager { get; set; } - [Parameter] - public ApplicationMenuItem MenuItem { get; set; } + [Parameter] + public ApplicationMenuItem MenuItem { get; set; } - public bool IsSubMenuOpen { get; set; } + public bool IsSubMenuOpen { get; set; } - protected override void OnInitialized() - { - NavigationManager.LocationChanged += OnLocationChanged; - } + protected override void OnInitialized() + { + NavigationManager.LocationChanged += OnLocationChanged; + } - private void ToggleSubMenu() - { - IsSubMenuOpen = !IsSubMenuOpen; - } + private void ToggleSubMenu() + { + IsSubMenuOpen = !IsSubMenuOpen; + } - public void Dispose() - { - NavigationManager.LocationChanged -= OnLocationChanged; - } + public void Dispose() + { + NavigationManager.LocationChanged -= OnLocationChanged; + } - private void OnLocationChanged(object sender, LocationChangedEventArgs e) - { - IsSubMenuOpen = false; - InvokeAsync(StateHasChanged); - } + private void OnLocationChanged(object sender, LocationChangedEventArgs e) + { + IsSubMenuOpen = false; + InvokeAsync(StateHasChanged); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/MainLayout.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/MainLayout.razor.cs index 5108982f74..7f74c55a96 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/MainLayout.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/MainLayout.razor.cs @@ -2,33 +2,32 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Routing; -namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic +namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic; + +public partial class MainLayout : IDisposable { - public partial class MainLayout : IDisposable - { - [Inject] private NavigationManager NavigationManager { get; set; } + [Inject] private NavigationManager NavigationManager { get; set; } - private bool IsCollapseShown { get; set; } + private bool IsCollapseShown { get; set; } - protected override void OnInitialized() - { - NavigationManager.LocationChanged += OnLocationChanged; - } + protected override void OnInitialized() + { + NavigationManager.LocationChanged += OnLocationChanged; + } - private void ToggleCollapse() - { - IsCollapseShown = !IsCollapseShown; - } + private void ToggleCollapse() + { + IsCollapseShown = !IsCollapseShown; + } - public void Dispose() - { - NavigationManager.LocationChanged -= OnLocationChanged; - } + public void Dispose() + { + NavigationManager.LocationChanged -= OnLocationChanged; + } - private void OnLocationChanged(object sender, LocationChangedEventArgs e) - { - IsCollapseShown = false; - InvokeAsync(StateHasChanged); - } + private void OnLocationChanged(object sender, LocationChangedEventArgs e) + { + IsCollapseShown = false; + InvokeAsync(StateHasChanged); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/NavMenu.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/NavMenu.razor.cs index eba195a9e3..fb117369eb 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/NavMenu.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/NavMenu.razor.cs @@ -4,33 +4,32 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Authorization; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic +namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic; + +public partial class NavMenu : IDisposable { - public partial class NavMenu : IDisposable - { - [Inject] - protected IMenuManager MenuManager { get; set; } - - [Inject] - protected AuthenticationStateProvider AuthenticationStateProvider { get; set; } + [Inject] + protected IMenuManager MenuManager { get; set; } + + [Inject] + protected AuthenticationStateProvider AuthenticationStateProvider { get; set; } - protected ApplicationMenu Menu { get; set; } + protected ApplicationMenu Menu { get; set; } - protected override async Task OnInitializedAsync() - { - Menu = await MenuManager.GetMainMenuAsync(); - AuthenticationStateProvider.AuthenticationStateChanged += AuthenticationStateProviderOnAuthenticationStateChanged; - } - - public void Dispose() - { - AuthenticationStateProvider.AuthenticationStateChanged -= AuthenticationStateProviderOnAuthenticationStateChanged; - } + protected override async Task OnInitializedAsync() + { + Menu = await MenuManager.GetMainMenuAsync(); + AuthenticationStateProvider.AuthenticationStateChanged += AuthenticationStateProviderOnAuthenticationStateChanged; + } - private async void AuthenticationStateProviderOnAuthenticationStateChanged(Task task) - { - Menu = await MenuManager.GetMainMenuAsync(); - await InvokeAsync(StateHasChanged); - } + public void Dispose() + { + AuthenticationStateProvider.AuthenticationStateChanged -= AuthenticationStateProviderOnAuthenticationStateChanged; + } + + private async void AuthenticationStateProviderOnAuthenticationStateChanged(Task task) + { + Menu = await MenuManager.GetMainMenuAsync(); + await InvokeAsync(StateHasChanged); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/NavToolbar.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/NavToolbar.razor.cs index 791ac08927..8e1040ae89 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/NavToolbar.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/NavToolbar.razor.cs @@ -6,50 +6,49 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Authorization; using Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; -namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic +namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic; + +public partial class NavToolbar : IDisposable { - public partial class NavToolbar : IDisposable - { - [Inject] - private IToolbarManager ToolbarManager { get; set; } + [Inject] + private IToolbarManager ToolbarManager { get; set; } - [Inject] - private AuthenticationStateProvider AuthenticationStateProvider { get; set; } + [Inject] + private AuthenticationStateProvider AuthenticationStateProvider { get; set; } - private List ToolbarItemRenders { get; set; } = new List(); + private List ToolbarItemRenders { get; set; } = new List(); - protected override async Task OnInitializedAsync() - { - await GetToolbarItemRendersAsync(); - AuthenticationStateProvider.AuthenticationStateChanged += AuthenticationStateProviderOnAuthenticationStateChanged; - } + protected override async Task OnInitializedAsync() + { + await GetToolbarItemRendersAsync(); + AuthenticationStateProvider.AuthenticationStateChanged += AuthenticationStateProviderOnAuthenticationStateChanged; + } - private async Task GetToolbarItemRendersAsync() - { - var toolbar = await ToolbarManager.GetAsync(StandardToolbars.Main); + private async Task GetToolbarItemRendersAsync() + { + var toolbar = await ToolbarManager.GetAsync(StandardToolbars.Main); - ToolbarItemRenders.Clear(); + ToolbarItemRenders.Clear(); - var sequence = 0; - foreach (var item in toolbar.Items) + var sequence = 0; + foreach (var item in toolbar.Items) + { + ToolbarItemRenders.Add(builder => { - ToolbarItemRenders.Add(builder => - { - builder.OpenComponent(sequence++, item.ComponentType); - builder.CloseComponent(); - }); - } + builder.OpenComponent(sequence++, item.ComponentType); + builder.CloseComponent(); + }); } + } - private async void AuthenticationStateProviderOnAuthenticationStateChanged(Task task) - { - await GetToolbarItemRendersAsync(); - await InvokeAsync(StateHasChanged); - } + private async void AuthenticationStateProviderOnAuthenticationStateChanged(Task task) + { + await GetToolbarItemRendersAsync(); + await InvokeAsync(StateHasChanged); + } - public void Dispose() - { - AuthenticationStateProvider.AuthenticationStateChanged -= AuthenticationStateProviderOnAuthenticationStateChanged; - } + public void Dispose() + { + AuthenticationStateProvider.AuthenticationStateChanged -= AuthenticationStateProviderOnAuthenticationStateChanged; } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor.cs index 311438784e..c736770884 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor.cs @@ -3,36 +3,35 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Routing; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic +namespace Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic; + +public partial class SecondLevelNavMenuItem : IDisposable { - public partial class SecondLevelNavMenuItem : IDisposable - { - [Inject] private NavigationManager NavigationManager { get; set; } + [Inject] private NavigationManager NavigationManager { get; set; } - [Parameter] - public ApplicationMenuItem MenuItem { get; set; } + [Parameter] + public ApplicationMenuItem MenuItem { get; set; } - public bool IsSubMenuOpen { get; set; } + public bool IsSubMenuOpen { get; set; } - protected override void OnInitialized() - { - NavigationManager.LocationChanged += OnLocationChanged; - } + protected override void OnInitialized() + { + NavigationManager.LocationChanged += OnLocationChanged; + } - private void ToggleSubMenu() - { - IsSubMenuOpen = !IsSubMenuOpen; - } + private void ToggleSubMenu() + { + IsSubMenuOpen = !IsSubMenuOpen; + } - public void Dispose() - { - NavigationManager.LocationChanged -= OnLocationChanged; - } + public void Dispose() + { + NavigationManager.LocationChanged -= OnLocationChanged; + } - private void OnLocationChanged(object sender, LocationChangedEventArgs e) - { - IsSubMenuOpen = false; - InvokeAsync(StateHasChanged); - } + private void OnLocationChanged(object sender, LocationChangedEventArgs e) + { + IsSubMenuOpen = false; + InvokeAsync(StateHasChanged); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/AbpAspNetCoreComponentsWebAssemblyBasicThemeModule.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/AbpAspNetCoreComponentsWebAssemblyBasicThemeModule.cs index 799cc76b66..a1b179abf3 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/AbpAspNetCoreComponentsWebAssemblyBasicThemeModule.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/AbpAspNetCoreComponentsWebAssemblyBasicThemeModule.cs @@ -5,26 +5,25 @@ using Volo.Abp.AspNetCore.Components.WebAssembly.Theming; using Volo.Abp.Http.Client.IdentityModel.WebAssembly; using Volo.Abp.Modularity; -namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme +namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme; + +[DependsOn( + typeof(AbpAspNetCoreComponentsWebBasicThemeModule), + typeof(AbpAspNetCoreComponentsWebAssemblyThemingModule), + typeof(AbpHttpClientIdentityModelWebAssemblyModule) + )] +public class AbpAspNetCoreComponentsWebAssemblyBasicThemeModule : AbpModule { - [DependsOn( - typeof(AbpAspNetCoreComponentsWebBasicThemeModule), - typeof(AbpAspNetCoreComponentsWebAssemblyThemingModule), - typeof(AbpHttpClientIdentityModelWebAssemblyModule) - )] - public class AbpAspNetCoreComponentsWebAssemblyBasicThemeModule : AbpModule + public override void ConfigureServices(ServiceConfigurationContext context) { - public override void ConfigureServices(ServiceConfigurationContext context) + Configure(options => { - Configure(options => - { - options.AdditionalAssemblies.Add(typeof(AbpAspNetCoreComponentsWebAssemblyBasicThemeModule).Assembly); - }); + options.AdditionalAssemblies.Add(typeof(AbpAspNetCoreComponentsWebAssemblyBasicThemeModule).Assembly); + }); - Configure(options => - { - options.Contributors.Add(new BasicThemeToolbarContributor()); - }); - } + Configure(options => + { + options.Contributors.Add(new BasicThemeToolbarContributor()); + }); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs index 09e0adfaff..67b29987f1 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeBundleContributor.cs @@ -1,17 +1,16 @@ using Volo.Abp.Bundling; -namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme +namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme; + +public class BasicThemeBundleContributor : IBundleContributor { - public class BasicThemeBundleContributor : IBundleContributor + public void AddScripts(BundleContext context) { - public void AddScripts(BundleContext context) - { - } + } - public void AddStyles(BundleContext context) - { - context.Add("_content/Volo.Abp.AspNetCore.Components.Web.BasicTheme/libs/abp/css/theme.css"); - } + public void AddStyles(BundleContext context) + { + context.Add("_content/Volo.Abp.AspNetCore.Components.Web.BasicTheme/libs/abp/css/theme.css"); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeToolbarContributor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeToolbarContributor.cs index b853670d39..39cc08ddd1 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeToolbarContributor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/BasicThemeToolbarContributor.cs @@ -6,27 +6,26 @@ using Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; using Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic; using Volo.Abp.DependencyInjection; -namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme +namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme; + +public class BasicThemeToolbarContributor : IToolbarContributor { - public class BasicThemeToolbarContributor : IToolbarContributor + public Task ConfigureToolbarAsync(IToolbarConfigurationContext context) { - public Task ConfigureToolbarAsync(IToolbarConfigurationContext context) + if (context.Toolbar.Name == StandardToolbars.Main) { - if (context.Toolbar.Name == StandardToolbars.Main) + context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitch))); + + //TODO: Can we find a different way to understand if authentication was configured or not? + var authenticationStateProvider = context.ServiceProvider + .GetService(); + + if (authenticationStateProvider != null) { - context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitch))); - - //TODO: Can we find a different way to understand if authentication was configured or not? - var authenticationStateProvider = context.ServiceProvider - .GetService(); - - if (authenticationStateProvider != null) - { - context.Toolbar.Items.Add(new ToolbarItem(typeof(LoginDisplay))); - } + context.Toolbar.Items.Add(new ToolbarItem(typeof(LoginDisplay))); } - - return Task.CompletedTask; } + + return Task.CompletedTask; } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs index fb1c5266b0..bee01d369b 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs @@ -8,70 +8,69 @@ using Microsoft.AspNetCore.Components.WebAssembly.Authentication; using Microsoft.JSInterop; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic +namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic; + +public partial class LoginDisplay : IDisposable { - public partial class LoginDisplay : IDisposable - { - [Inject] - protected IMenuManager MenuManager { get; set; } + [Inject] + protected IMenuManager MenuManager { get; set; } - [Inject] - public AuthenticationStateProvider AuthenticationStateProvider { get; set; } + [Inject] + public AuthenticationStateProvider AuthenticationStateProvider { get; set; } - [CanBeNull] - protected SignOutSessionStateManager SignOutManager; + [CanBeNull] + protected SignOutSessionStateManager SignOutManager; - protected ApplicationMenu Menu { get; set; } + protected ApplicationMenu Menu { get; set; } - protected override async Task OnInitializedAsync() - { - Menu = await MenuManager.GetAsync(StandardMenus.User); + protected override async Task OnInitializedAsync() + { + Menu = await MenuManager.GetAsync(StandardMenus.User); - Navigation.LocationChanged += OnLocationChanged; + Navigation.LocationChanged += OnLocationChanged; - LazyGetService(ref SignOutManager); + LazyGetService(ref SignOutManager); - AuthenticationStateProvider.AuthenticationStateChanged += - AuthenticationStateProviderOnAuthenticationStateChanged; - } + AuthenticationStateProvider.AuthenticationStateChanged += + AuthenticationStateProviderOnAuthenticationStateChanged; + } - protected virtual void OnLocationChanged(object sender, LocationChangedEventArgs e) - { - InvokeAsync(StateHasChanged); - } + protected virtual void OnLocationChanged(object sender, LocationChangedEventArgs e) + { + InvokeAsync(StateHasChanged); + } - private async void AuthenticationStateProviderOnAuthenticationStateChanged(Task task) - { - Menu = await MenuManager.GetAsync(StandardMenus.User); - await InvokeAsync(StateHasChanged); - } + private async void AuthenticationStateProviderOnAuthenticationStateChanged(Task task) + { + Menu = await MenuManager.GetAsync(StandardMenus.User); + await InvokeAsync(StateHasChanged); + } + + public void Dispose() + { + Navigation.LocationChanged -= OnLocationChanged; + AuthenticationStateProvider.AuthenticationStateChanged -= + AuthenticationStateProviderOnAuthenticationStateChanged; + } - public void Dispose() + private async Task NavigateToAsync(string uri, string target = null) + { + if (target == "_blank") { - Navigation.LocationChanged -= OnLocationChanged; - AuthenticationStateProvider.AuthenticationStateChanged -= - AuthenticationStateProviderOnAuthenticationStateChanged; + await JsRuntime.InvokeVoidAsync("open", uri, target); } - - private async Task NavigateToAsync(string uri, string target = null) + else { - if (target == "_blank") - { - await JsRuntime.InvokeVoidAsync("open", uri, target); - } - else - { - Navigation.NavigateTo(uri); - } + Navigation.NavigateTo(uri); } + } - private async Task BeginSignOut() + private async Task BeginSignOut() + { + if (SignOutManager != null) { - if (SignOutManager != null) - { - await SignOutManager.SetSignOutState(); - await NavigateToAsync("authentication/logout"); - } + await SignOutManager.SetSignOutState(); + await NavigateToAsync("authentication/logout"); } } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs index 212967ee4a..745f63b8fb 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/AbpAspNetCoreMvcUIBasicThemeModule.cs @@ -10,64 +10,63 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theming; using Volo.Abp.Modularity; using Volo.Abp.VirtualFileSystem; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; + +[DependsOn( + typeof(AbpAspNetCoreMvcUiThemeSharedModule), + typeof(AbpAspNetCoreMvcUiMultiTenancyModule) + )] +public class AbpAspNetCoreMvcUiBasicThemeModule : AbpModule { - [DependsOn( - typeof(AbpAspNetCoreMvcUiThemeSharedModule), - typeof(AbpAspNetCoreMvcUiMultiTenancyModule) - )] - public class AbpAspNetCoreMvcUiBasicThemeModule : AbpModule + public override void PreConfigureServices(ServiceConfigurationContext context) { - public override void PreConfigureServices(ServiceConfigurationContext context) + PreConfigure(mvcBuilder => { - PreConfigure(mvcBuilder => - { - mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpAspNetCoreMvcUiBasicThemeModule).Assembly); - }); - } + mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpAspNetCoreMvcUiBasicThemeModule).Assembly); + }); + } - public override void ConfigureServices(ServiceConfigurationContext context) + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => { - Configure(options => - { - options.Themes.Add(); - - if (options.DefaultThemeName == null) - { - options.DefaultThemeName = BasicTheme.Name; - } - }); + options.Themes.Add(); - Configure(options => + if (options.DefaultThemeName == null) { - options.FileSets.AddEmbedded("Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic"); - }); + options.DefaultThemeName = BasicTheme.Name; + } + }); - Configure(options => - { - options.Contributors.Add(new BasicThemeMainTopToolbarContributor()); - }); + Configure(options => + { + options.FileSets.AddEmbedded("Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic"); + }); - Configure(options => - { - options - .StyleBundles - .Add(BasicThemeBundles.Styles.Global, bundle => - { - bundle - .AddBaseBundles(StandardBundles.Styles.Global) - .AddContributors(typeof(BasicThemeGlobalStyleContributor)); - }); + Configure(options => + { + options.Contributors.Add(new BasicThemeMainTopToolbarContributor()); + }); - options - .ScriptBundles - .Add(BasicThemeBundles.Scripts.Global, bundle => - { - bundle - .AddBaseBundles(StandardBundles.Scripts.Global) - .AddContributors(typeof(BasicThemeGlobalScriptContributor)); - }); - }); - } + Configure(options => + { + options + .StyleBundles + .Add(BasicThemeBundles.Styles.Global, bundle => + { + bundle + .AddBaseBundles(StandardBundles.Styles.Global) + .AddContributors(typeof(BasicThemeGlobalStyleContributor)); + }); + + options + .ScriptBundles + .Add(BasicThemeBundles.Scripts.Global, bundle => + { + bundle + .AddBaseBundles(StandardBundles.Scripts.Global) + .AddContributors(typeof(BasicThemeGlobalScriptContributor)); + }); + }); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/BasicTheme.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/BasicTheme.cs index 60d1307b38..1d04cf42e2 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/BasicTheme.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/BasicTheme.cs @@ -1,26 +1,25 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theming; using Volo.Abp.DependencyInjection; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; + +[ThemeName(Name)] +public class BasicTheme : ITheme, ITransientDependency { - [ThemeName(Name)] - public class BasicTheme : ITheme, ITransientDependency - { - public const string Name = "Basic"; + public const string Name = "Basic"; - public virtual string GetLayout(string name, bool fallbackToDefault = true) + public virtual string GetLayout(string name, bool fallbackToDefault = true) + { + switch (name) { - switch (name) - { - case StandardLayouts.Application: - return "~/Themes/Basic/Layouts/Application.cshtml"; - case StandardLayouts.Account: - return "~/Themes/Basic/Layouts/Account.cshtml"; - case StandardLayouts.Empty: - return "~/Themes/Basic/Layouts/Empty.cshtml"; - default: - return fallbackToDefault ? "~/Themes/Basic/Layouts/Application.cshtml" : null; - } + case StandardLayouts.Application: + return "~/Themes/Basic/Layouts/Application.cshtml"; + case StandardLayouts.Account: + return "~/Themes/Basic/Layouts/Account.cshtml"; + case StandardLayouts.Empty: + return "~/Themes/Basic/Layouts/Empty.cshtml"; + default: + return fallbackToDefault ? "~/Themes/Basic/Layouts/Application.cshtml" : null; } } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeBundles.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeBundles.cs index 1ac98f41d2..e09f8f1a8b 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeBundles.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeBundles.cs @@ -1,15 +1,14 @@ -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling; + +public static class BasicThemeBundles { - public static class BasicThemeBundles + public static class Styles { - public static class Styles - { - public const string Global = "Basic.Global"; - } + public const string Global = "Basic.Global"; + } - public static class Scripts - { - public const string Global = "Basic.Global"; - } + public static class Scripts + { + public const string Global = "Basic.Global"; } -} \ No newline at end of file +} diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalScriptContributor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalScriptContributor.cs index 76ce8b2c05..93f7ac877b 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalScriptContributor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalScriptContributor.cs @@ -1,12 +1,11 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling; + +public class BasicThemeGlobalScriptContributor : BundleContributor { - public class BasicThemeGlobalScriptContributor : BundleContributor + public override void ConfigureBundle(BundleConfigurationContext context) { - public override void ConfigureBundle(BundleConfigurationContext context) - { - context.Files.Add("/themes/basic/layout.js"); - } + context.Files.Add("/themes/basic/layout.js"); } -} \ No newline at end of file +} diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalStyleContributor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalStyleContributor.cs index bf60b4ccd0..6b22d0c894 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalStyleContributor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalStyleContributor.cs @@ -1,12 +1,11 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling; + +public class BasicThemeGlobalStyleContributor : BundleContributor { - public class BasicThemeGlobalStyleContributor : BundleContributor + public override void ConfigureBundle(BundleConfigurationContext context) { - public override void ConfigureBundle(BundleConfigurationContext context) - { - context.Files.Add("/themes/basic/layout.css"); - } + context.Files.Add("/themes/basic/layout.css"); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/MainNavbarBrandViewComponent.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/MainNavbarBrandViewComponent.cs index 564b4b70c2..4a569a0b12 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/MainNavbarBrandViewComponent.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Brand/MainNavbarBrandViewComponent.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Brand +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Brand; + +public class MainNavbarBrandViewComponent : AbpViewComponent { - public class MainNavbarBrandViewComponent : AbpViewComponent + public virtual IViewComponentResult Invoke() { - public virtual IViewComponentResult Invoke() - { - return View("~/Themes/Basic/Components/Brand/Default.cshtml"); - } + return View("~/Themes/Basic/Components/Brand/Default.cshtml"); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/MainNavbar/MainNavbarViewComponent.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/MainNavbar/MainNavbarViewComponent.cs index 64f097d24d..49ac70fa12 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/MainNavbar/MainNavbarViewComponent.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/MainNavbar/MainNavbarViewComponent.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.MainNavbar +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.MainNavbar; + +public class MainNavbarViewComponent : AbpViewComponent { - public class MainNavbarViewComponent : AbpViewComponent + public virtual IViewComponentResult Invoke() { - public virtual IViewComponentResult Invoke() - { - return View("~/Themes/Basic/Components/MainNavbar/Default.cshtml"); - } + return View("~/Themes/Basic/Components/MainNavbar/Default.cshtml"); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs index 31aeafbc99..e723618854 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/MainNavbarMenuViewComponent.cs @@ -2,21 +2,20 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Menu +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Menu; + +public class MainNavbarMenuViewComponent : AbpViewComponent { - public class MainNavbarMenuViewComponent : AbpViewComponent - { - protected IMenuManager MenuManager { get; } + protected IMenuManager MenuManager { get; } - public MainNavbarMenuViewComponent(IMenuManager menuManager) - { - MenuManager = menuManager; - } + public MainNavbarMenuViewComponent(IMenuManager menuManager) + { + MenuManager = menuManager; + } - public virtual async Task InvokeAsync() - { - var menu = await MenuManager.GetMainMenuAsync(); - return View("~/Themes/Basic/Components/Menu/Default.cshtml", menu); - } + public virtual async Task InvokeAsync() + { + var menu = await MenuManager.GetMainMenuAsync(); + return View("~/Themes/Basic/Components/Menu/Default.cshtml", menu); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/PageAlerts/PageAlertsViewComponent.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/PageAlerts/PageAlertsViewComponent.cs index 9c99930caf..212e4f3e9d 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/PageAlerts/PageAlertsViewComponent.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/PageAlerts/PageAlertsViewComponent.cs @@ -1,20 +1,19 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.Alerts; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.PageAlerts +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.PageAlerts; + +public class PageAlertsViewComponent : AbpViewComponent { - public class PageAlertsViewComponent : AbpViewComponent - { - protected IAlertManager AlertManager { get; } + protected IAlertManager AlertManager { get; } - public PageAlertsViewComponent(IAlertManager alertManager) - { - AlertManager = alertManager; - } + public PageAlertsViewComponent(IAlertManager alertManager) + { + AlertManager = alertManager; + } - public IViewComponentResult Invoke(string name) - { - return View("~/Themes/Basic/Components/PageAlerts/Default.cshtml", AlertManager.Alerts); - } + public IViewComponentResult Invoke(string name) + { + return View("~/Themes/Basic/Components/PageAlerts/Default.cshtml", AlertManager.Alerts); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs index 1a8591464d..5701dd8521 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponent.cs @@ -6,52 +6,51 @@ using Microsoft.AspNetCore.RequestLocalization; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Localization; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch; + +public class LanguageSwitchViewComponent : AbpViewComponent { - public class LanguageSwitchViewComponent : AbpViewComponent + protected ILanguageProvider LanguageProvider { get; } + + public LanguageSwitchViewComponent(ILanguageProvider languageProvider) { - protected ILanguageProvider LanguageProvider { get; } + LanguageProvider = languageProvider; + } - public LanguageSwitchViewComponent(ILanguageProvider languageProvider) - { - LanguageProvider = languageProvider; - } + public virtual async Task InvokeAsync() + { + var languages = await LanguageProvider.GetLanguagesAsync(); + var currentLanguage = languages.FindByCulture( + CultureInfo.CurrentCulture.Name, + CultureInfo.CurrentUICulture.Name + ); - public virtual async Task InvokeAsync() + if (currentLanguage == null) { - var languages = await LanguageProvider.GetLanguagesAsync(); - var currentLanguage = languages.FindByCulture( - CultureInfo.CurrentCulture.Name, - CultureInfo.CurrentUICulture.Name - ); - - if (currentLanguage == null) + var abpRequestLocalizationOptionsProvider = HttpContext.RequestServices.GetRequiredService(); + var localizationOptions = await abpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync(); + if (localizationOptions.DefaultRequestCulture != null) { - var abpRequestLocalizationOptionsProvider = HttpContext.RequestServices.GetRequiredService(); - var localizationOptions = await abpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync(); - if (localizationOptions.DefaultRequestCulture != null) - { - currentLanguage = new LanguageInfo( - localizationOptions.DefaultRequestCulture.Culture.Name, - localizationOptions.DefaultRequestCulture.UICulture.Name, - localizationOptions.DefaultRequestCulture.UICulture.DisplayName); - } - else - { - currentLanguage = new LanguageInfo( - CultureInfo.CurrentCulture.Name, - CultureInfo.CurrentUICulture.Name, - CultureInfo.CurrentUICulture.DisplayName); - } + currentLanguage = new LanguageInfo( + localizationOptions.DefaultRequestCulture.Culture.Name, + localizationOptions.DefaultRequestCulture.UICulture.Name, + localizationOptions.DefaultRequestCulture.UICulture.DisplayName); } - - var model = new LanguageSwitchViewComponentModel + else { - CurrentLanguage = currentLanguage, - OtherLanguages = languages.Where(l => l != currentLanguage).ToList() - }; - - return View("~/Themes/Basic/Components/Toolbar/LanguageSwitch/Default.cshtml", model); + currentLanguage = new LanguageInfo( + CultureInfo.CurrentCulture.Name, + CultureInfo.CurrentUICulture.Name, + CultureInfo.CurrentUICulture.DisplayName); + } } + + var model = new LanguageSwitchViewComponentModel + { + CurrentLanguage = currentLanguage, + OtherLanguages = languages.Where(l => l != currentLanguage).ToList() + }; + + return View("~/Themes/Basic/Components/Toolbar/LanguageSwitch/Default.cshtml", model); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponentModel.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponentModel.cs index 248675dbe1..60c3cf6ddf 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponentModel.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/LanguageSwitchViewComponentModel.cs @@ -1,12 +1,11 @@ using System.Collections.Generic; using Volo.Abp.Localization; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch; + +public class LanguageSwitchViewComponentModel { - public class LanguageSwitchViewComponentModel - { - public LanguageInfo CurrentLanguage { get; set; } + public LanguageInfo CurrentLanguage { get; set; } - public List OtherLanguages { get; set; } - } -} \ No newline at end of file + public List OtherLanguages { get; set; } +} diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolbarViewComponent.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolbarViewComponent.cs index df93ec1b6d..6e76579ff9 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolbarViewComponent.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolbarViewComponent.cs @@ -2,21 +2,20 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar; + +public class MainNavbarToolbarViewComponent : AbpViewComponent { - public class MainNavbarToolbarViewComponent : AbpViewComponent - { - protected IToolbarManager ToolbarManager { get; } + protected IToolbarManager ToolbarManager { get; } - public MainNavbarToolbarViewComponent(IToolbarManager toolbarManager) - { - ToolbarManager = toolbarManager; - } + public MainNavbarToolbarViewComponent(IToolbarManager toolbarManager) + { + ToolbarManager = toolbarManager; + } - public virtual async Task InvokeAsync() - { - var toolbar = await ToolbarManager.GetAsync(StandardToolbars.Main); - return View("~/Themes/Basic/Components/Toolbar/Default.cshtml", toolbar); - } + public virtual async Task InvokeAsync() + { + var toolbar = await ToolbarManager.GetAsync(StandardToolbars.Main); + return View("~/Themes/Basic/Components/Toolbar/Default.cshtml", toolbar); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs index d84c48b30a..ccee35244a 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/UserMenuViewComponent.cs @@ -2,21 +2,20 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.UserMenu +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.UserMenu; + +public class UserMenuViewComponent : AbpViewComponent { - public class UserMenuViewComponent : AbpViewComponent - { - protected IMenuManager MenuManager { get; } + protected IMenuManager MenuManager { get; } - public UserMenuViewComponent(IMenuManager menuManager) - { - MenuManager = menuManager; - } + public UserMenuViewComponent(IMenuManager menuManager) + { + MenuManager = menuManager; + } - public virtual async Task InvokeAsync() - { - var menu = await MenuManager.GetAsync(StandardMenus.User); - return View("~/Themes/Basic/Components/Toolbar/UserMenu/Default.cshtml", menu); - } + public virtual async Task InvokeAsync() + { + var menu = await MenuManager.GetAsync(StandardMenus.User); + return View("~/Themes/Basic/Components/Toolbar/UserMenu/Default.cshtml", menu); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs index 1ed1d2d5d3..aae7a512cb 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Toolbars/BasicThemeMainTopToolbarContributor.cs @@ -6,35 +6,34 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; using Volo.Abp.Localization; using Volo.Abp.Users; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Toolbars +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Toolbars; + +public class BasicThemeMainTopToolbarContributor : IToolbarContributor { - public class BasicThemeMainTopToolbarContributor : IToolbarContributor + public async Task ConfigureToolbarAsync(IToolbarConfigurationContext context) { - public async Task ConfigureToolbarAsync(IToolbarConfigurationContext context) + if (context.Toolbar.Name != StandardToolbars.Main) { - if (context.Toolbar.Name != StandardToolbars.Main) - { - return; - } + return; + } - if (!(context.Theme is BasicTheme)) - { - return; - } + if (!(context.Theme is BasicTheme)) + { + return; + } - var languageProvider = context.ServiceProvider.GetService(); + var languageProvider = context.ServiceProvider.GetService(); - //TODO: This duplicates GetLanguages() usage. Can we eleminate this? - var languages = await languageProvider.GetLanguagesAsync(); - if (languages.Count > 1) - { - context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitchViewComponent))); - } + //TODO: This duplicates GetLanguages() usage. Can we eleminate this? + var languages = await languageProvider.GetLanguagesAsync(); + if (languages.Count > 1) + { + context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitchViewComponent))); + } - if (context.ServiceProvider.GetRequiredService().IsAuthenticated) - { - context.Toolbar.Items.Add(new ToolbarItem(typeof(UserMenuViewComponent))); - } + if (context.ServiceProvider.GetRequiredService().IsAuthenticated) + { + context.Toolbar.Items.Add(new ToolbarItem(typeof(UserMenuViewComponent))); } } } diff --git a/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/AbpBasicThemeInstallerModule.cs b/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/AbpBasicThemeInstallerModule.cs index 6339bb05be..1832de02bd 100644 --- a/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/AbpBasicThemeInstallerModule.cs +++ b/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/AbpBasicThemeInstallerModule.cs @@ -2,20 +2,19 @@ using Volo.Abp.Studio; using Volo.Abp.VirtualFileSystem; -namespace Volo.Abp.BasicTheme +namespace Volo.Abp.BasicTheme; + +[DependsOn( + typeof(AbpStudioModuleInstallerModule), + typeof(AbpVirtualFileSystemModule) + )] +public class AbpBasicThemeInstallerModule : AbpModule { - [DependsOn( - typeof(AbpStudioModuleInstallerModule), - typeof(AbpVirtualFileSystemModule) - )] - public class AbpBasicThemeInstallerModule : AbpModule + public override void ConfigureServices(ServiceConfigurationContext context) { - public override void ConfigureServices(ServiceConfigurationContext context) + Configure(options => { - Configure(options => - { - options.FileSets.AddEmbedded(); - }); - } + options.FileSets.AddEmbedded(); + }); } } diff --git a/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/BasicThemeInstallerPipelineBuilder.cs b/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/BasicThemeInstallerPipelineBuilder.cs index e90238130b..4b80e9d364 100644 --- a/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/BasicThemeInstallerPipelineBuilder.cs +++ b/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/Volo/Abp/BasicTheme/BasicThemeInstallerPipelineBuilder.cs @@ -3,15 +3,14 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.DependencyInjection; using Volo.Abp.Studio.ModuleInstalling; -namespace Volo.Abp.BasicTheme +namespace Volo.Abp.BasicTheme; + +[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] +[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] +public class BasicThemeInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency { - [Dependency(ServiceLifetime.Transient, ReplaceServices = true)] - [ExposeServices(typeof(IModuleInstallingPipelineBuilder))] - public class BasicThemeInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency + public async Task BuildAsync(ModuleInstallingContext context) { - public async Task BuildAsync(ModuleInstallingContext context) - { - return GetBasePipeline(context); - } + return GetBasePipeline(context); } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs index ec07aeab4a..98a4820611 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs @@ -9,67 +9,66 @@ using Microsoft.Extensions.Hosting; using Shouldly; using Volo.Abp.AspNetCore.TestBase; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo; + +public abstract class AbpAspNetCoreMvcUiBootstrapDemoTestBase : AbpAspNetCoreIntegratedTestBase { - public abstract class AbpAspNetCoreMvcUiBootstrapDemoTestBase : AbpAspNetCoreIntegratedTestBase + protected override IHostBuilder CreateHostBuilder() { - protected override IHostBuilder CreateHostBuilder() - { - return base.CreateHostBuilder() - .UseContentRoot(CalculateContentRootPath()); - } + return base.CreateHostBuilder() + .UseContentRoot(CalculateContentRootPath()); + } - private static string CalculateContentRootPath() - { - return CalculateContentRootPath( - "Volo.Abp.sln", - $"test{Path.DirectorySeparatorChar}Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo" - ); - } + private static string CalculateContentRootPath() + { + return CalculateContentRootPath( + "Volo.Abp.sln", + $"test{Path.DirectorySeparatorChar}Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo" + ); + } - private static string CalculateContentRootPath( - string testFileNameInTheRootFolder, - string relativeContentPath) + private static string CalculateContentRootPath( + string testFileNameInTheRootFolder, + string relativeContentPath) + { + var currentDirectory = Directory.GetCurrentDirectory(); + while (!ContainsFile(currentDirectory, testFileNameInTheRootFolder)) { - var currentDirectory = Directory.GetCurrentDirectory(); - while (!ContainsFile(currentDirectory, testFileNameInTheRootFolder)) - { - currentDirectory = new DirectoryInfo(currentDirectory).Parent.FullName; - } - - if (!relativeContentPath.IsNullOrWhiteSpace()) - { - currentDirectory = Path.Combine(currentDirectory, relativeContentPath); - } - - return currentDirectory; + currentDirectory = new DirectoryInfo(currentDirectory).Parent.FullName; } - private static bool ContainsFile(string currentDirectory, string projectFileName) + if (!relativeContentPath.IsNullOrWhiteSpace()) { - return Directory - .GetFiles(currentDirectory, "*.*", SearchOption.TopDirectoryOnly) - .Any(f => Path.GetFileName(f) == projectFileName); + currentDirectory = Path.Combine(currentDirectory, relativeContentPath); } + return currentDirectory; + } + + private static bool ContainsFile(string currentDirectory, string projectFileName) + { + return Directory + .GetFiles(currentDirectory, "*.*", SearchOption.TopDirectoryOnly) + .Any(f => Path.GetFileName(f) == projectFileName); + } - protected virtual async Task GetResponseAsStringAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK) + + protected virtual async Task GetResponseAsStringAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK) + { + using (var response = await GetResponseAsync(url, expectedStatusCode)) { - using (var response = await GetResponseAsync(url, expectedStatusCode)) - { - return await response.Content.ReadAsStringAsync(); - } + return await response.Content.ReadAsStringAsync(); } + } - protected virtual async Task GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK) + protected virtual async Task GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK) + { + using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url)) { - using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url)) - { - requestMessage.Headers.Add("Accept-Language", CultureInfo.CurrentUICulture.Name); - var response = await Client.SendAsync(requestMessage); - response.StatusCode.ShouldBe(expectedStatusCode); - return response; - } + requestMessage.Headers.Add("Accept-Language", CultureInfo.CurrentUICulture.Name); + var response = await Client.SendAsync(requestMessage); + response.StatusCode.ShouldBe(expectedStatusCode); + return response; } } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestModule.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestModule.cs index c1edaa3ef8..37a1c3ce0a 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestModule.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestModule.cs @@ -1,14 +1,13 @@ using Volo.Abp.AspNetCore.TestBase; using Volo.Abp.Modularity; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo; + +[DependsOn( + typeof(AbpAspNetCoreMvcUiBootstrapDemoModule), + typeof(AbpAspNetCoreTestBaseModule) +)] +public class AbpAspNetCoreMvcUiBootstrapDemoTestModule : AbpModule { - [DependsOn( - typeof(AbpAspNetCoreMvcUiBootstrapDemoModule), - typeof(AbpAspNetCoreTestBaseModule) - )] - public class AbpAspNetCoreMvcUiBootstrapDemoTestModule : AbpModule - { - } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/Components/Card_Tests.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/Components/Card_Tests.cs index 9fcac03459..7885d2d619 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/Components/Card_Tests.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/Components/Card_Tests.cs @@ -2,15 +2,14 @@ using Shouldly; using Xunit; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Components; + +public class Card_Tests : AbpAspNetCoreMvcUiBootstrapDemoTestBase { - public class Card_Tests : AbpAspNetCoreMvcUiBootstrapDemoTestBase + [Fact(Skip = "This test project is not completed yet")] + public async Task Index() { - [Fact(Skip = "This test project is not completed yet")] - public async Task Index() - { - var result = await GetResponseAsStringAsync("/Components/Cards"); - result.ShouldNotBeNullOrEmpty(); - } + var result = await GetResponseAsStringAsync("/Components/Cards"); + result.ShouldNotBeNullOrEmpty(); } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs index 3e39ba0f36..0e94780e4c 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs @@ -4,18 +4,17 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo; + +public class TestStartup { - public class TestStartup + public void ConfigureServices(IServiceCollection services) { - public void ConfigureServices(IServiceCollection services) - { - services.AddApplication(); - } + services.AddApplication(); + } - public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) - { - app.InitializeApplication(); - } + public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) + { + app.InitializeApplication(); } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/AbpAspNetCoreMvcUiBootstrapDemoModule.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/AbpAspNetCoreMvcUiBootstrapDemoModule.cs index 86e368a64c..8437109aba 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/AbpAspNetCoreMvcUiBootstrapDemoModule.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/AbpAspNetCoreMvcUiBootstrapDemoModule.cs @@ -4,27 +4,26 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.Autofac; using Volo.Abp.Modularity; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo; + +[DependsOn( + typeof(AbpAspNetCoreMvcUiBasicThemeModule), + typeof(AbpAutofacModule) + )] +public class AbpAspNetCoreMvcUiBootstrapDemoModule : AbpModule { - [DependsOn( - typeof(AbpAspNetCoreMvcUiBasicThemeModule), - typeof(AbpAutofacModule) - )] - public class AbpAspNetCoreMvcUiBootstrapDemoModule : AbpModule + public override void OnApplicationInitialization(ApplicationInitializationContext context) { - public override void OnApplicationInitialization(ApplicationInitializationContext context) - { - var app = context.GetApplicationBuilder(); - var env = context.GetEnvironment(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); - app.UseRouting(); - app.UseStaticFiles(); - app.UseConfiguredEndpoints(); + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); } + + app.UseRouting(); + app.UseStaticFiles(); + app.UseConfiguredEndpoints(); } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Alerts.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Alerts.cshtml.cs index 0fdfa461e7..b1cdf2e0ec 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Alerts.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Alerts.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class AlertsModel : PageModel { - public class AlertsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Badges.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Badges.cshtml.cs index d4bbff0ad3..c75d4d470c 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Badges.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Badges.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class BadgesModel : PageModel { - public class BadgesModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Blockquotes.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Blockquotes.cshtml.cs index 8d4f769f26..37f8ed8e85 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Blockquotes.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Blockquotes.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class BlockquotesModel : PageModel { - public class BlockquotesModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Borders.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Borders.cshtml.cs index 1250014b6a..ee77b120fa 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Borders.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Borders.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class BordersModel : PageModel { - public class BordersModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Breadcrumbs.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Breadcrumbs.cshtml.cs index adf2a5570b..f2a71c322b 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Breadcrumbs.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Breadcrumbs.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class BreadcrumbsModel : PageModel { - public class BreadcrumbsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ButtonGroups.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ButtonGroups.cshtml.cs index dc9ac3c2eb..9ded3fd5f4 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ButtonGroups.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ButtonGroups.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class ButtonGroupsModel : PageModel { - public class ButtonGroupsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Buttons.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Buttons.cshtml.cs index fa1c9eb55c..7b175e620e 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Buttons.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Buttons.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class ButtonsModel : PageModel { - public class ButtonsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Cards.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Cards.cshtml.cs index c94b69e4fe..4a5d541668 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Cards.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Cards.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class CardsModel : PageModel { - public class CardsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Carousel.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Carousel.cshtml.cs index 068840859f..f09ff4e111 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Carousel.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Carousel.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class CarouselsModel : PageModel { - public class CarouselsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Collapse.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Collapse.cshtml.cs index ee5a2275e5..22e02b5c86 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Collapse.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Collapse.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class CollapseModel : PageModel { - public class CollapseModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Dropdowns.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Dropdowns.cshtml.cs index 1b1cf6c4f2..0951ddbef5 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Dropdowns.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Dropdowns.cshtml.cs @@ -6,27 +6,26 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class DropdownsModel : PageModel { - public class DropdownsModel : PageModel - { - [Required] - [DataType(DataType.EmailAddress)] - [Display(Name = "Email Address")] - public string EmailAddress { get; set; } + [Required] + [DataType(DataType.EmailAddress)] + [Display(Name = "Email Address")] + public string EmailAddress { get; set; } - [Required] - [DataType(DataType.Password)] - [Display(Name = "Password")] - public string Password{ get; set; } + [Required] + [DataType(DataType.Password)] + [Display(Name = "Password")] + public string Password { get; set; } - [Display(Name = "Remember Me")] - public bool RememberMe{ get; set; } + [Display(Name = "Remember Me")] + public bool RememberMe { get; set; } - public void OnGet() - { + public void OnGet() + { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/DynamicForms.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/DynamicForms.cshtml.cs index adfd91c688..889744fd66 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/DynamicForms.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/DynamicForms.cshtml.cs @@ -7,20 +7,20 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Mvc.Rendering; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class DynamicFormsModel : PageModel { - public class DynamicFormsModel : PageModel - { - [BindProperty] - public DetailedModel MyDetailedModel { get; set; } + [BindProperty] + public DetailedModel MyDetailedModel { get; set; } - public OrderExampleModel MyOrderExampleModel { get; set; } + public OrderExampleModel MyOrderExampleModel { get; set; } - public AttributeExamplesModel MyAttributeExamplesModel { get; set; } + public AttributeExamplesModel MyAttributeExamplesModel { get; set; } - public FormContentExampleModel MyFormContentExampleModel { get; set; } + public FormContentExampleModel MyFormContentExampleModel { get; set; } - public List CountryList { get; set; } = new List + public List CountryList { get; set; } = new List { new SelectListItem { Value = "CA", Text = "Canada"}, new SelectListItem { Value = "US", Text = "USA"}, @@ -28,132 +28,131 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components new SelectListItem { Value = "RU", Text = "Russia"} }; - public void OnGet() - { - MyDetailedModel = new DetailedModel - { - Name = "", - Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", - IsActive = true, - Age = 65, - Day = DateTime.Now, - MyCarType = CarType.Coupe, - YourCarType = CarType.Sedan, - Country = "RU", - NeighborCountries = new List() { "UK", "CA" } - }; - - MyFormContentExampleModel = new FormContentExampleModel(); - - MyOrderExampleModel = new OrderExampleModel(); - - MyAttributeExamplesModel = new AttributeExamplesModel - { - DisabledInput = "Disabled Input", - ReadonlyInput = "Readonly Input", - LargeInput = "Large Input", - SmallInput = "Small Input" - }; - - } - - public class FormContentExampleModel + public void OnGet() + { + MyDetailedModel = new DetailedModel { - public string SampleInput { get; set; } - } + Name = "", + Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", + IsActive = true, + Age = 65, + Day = DateTime.Now, + MyCarType = CarType.Coupe, + YourCarType = CarType.Sedan, + Country = "RU", + NeighborCountries = new List() { "UK", "CA" } + }; + + MyFormContentExampleModel = new FormContentExampleModel(); + + MyOrderExampleModel = new OrderExampleModel(); - public class AttributeExamplesModel + MyAttributeExamplesModel = new AttributeExamplesModel { - [HiddenInput] - public string HiddenInput { get; set; } + DisabledInput = "Disabled Input", + ReadonlyInput = "Readonly Input", + LargeInput = "Large Input", + SmallInput = "Small Input" + }; - [DisabledInput] - public string DisabledInput{ get; set; } + } - [ReadOnlyInput] - public string ReadonlyInput { get; set; } + public class FormContentExampleModel + { + public string SampleInput { get; set; } + } - [FormControlSize(AbpFormControlSize.Large)] - public string LargeInput { get; set; } + public class AttributeExamplesModel + { + [HiddenInput] + public string HiddenInput { get; set; } - [FormControlSize(AbpFormControlSize.Small)] - public string SmallInput { get; set; } - } + [DisabledInput] + public string DisabledInput { get; set; } - public class OrderExampleModel - { - [DisplayOrder(10005)] - public string Surname{ get; set; } + [ReadOnlyInput] + public string ReadonlyInput { get; set; } - //Default 10000 - public string EmailAddress { get; set; } + [FormControlSize(AbpFormControlSize.Large)] + public string LargeInput { get; set; } - [DisplayOrder(10003)] - public string Name { get; set; } + [FormControlSize(AbpFormControlSize.Small)] + public string SmallInput { get; set; } + } - [DisplayOrder(9999)] - public string City { get; set; } - } + public class OrderExampleModel + { + [DisplayOrder(10005)] + public string Surname { get; set; } - public class DetailedModel - { - [Required] - [Placeholder("Enter your name...")] - [Display(Name = "Name")] - public string Name { get; set; } - - [TextArea(Rows = 4)] - [Display(Name = "Description")] - [InputInfoText("Describe Yourself")] - public string Description { get; set; } - - [Required] - [DataType(DataType.Password)] - [Display(Name = "Password")] - public string Password { get; set; } - - [Display(Name = "Is Active")] - public bool IsActive { get; set; } - - [Required] - [Display(Name = "Age")] - public int Age { get; set; } - - [Required] - [Display(Name = "My Car Type")] - public CarType MyCarType { get; set; } - - [Required] - [Display(Name = "My Car Type Nullable")] - public CarType? MyCarTypeNullable { get; set; } - - [Required] - [AbpRadioButton(Inline = true)] - [Display(Name = "Your Car Type")] - public CarType YourCarType { get; set; } - - [DataType(DataType.Date)] - [Display(Name = "Day")] - public DateTime Day { get; set; } - - [SelectItems(nameof(CountryList))] - [Display(Name = "Country")] - public string Country { get; set; } - - [SelectItems(nameof(CountryList))] - [Display(Name = "Neighbor Countries")] - public List NeighborCountries { get; set; } - - [DynamicFormIgnore] - public string IgnoredProperty { get; set; } - } - - public enum CarType - { - Sedan, - Hatchback, - StationWagon, - Coupe - } + //Default 10000 + public string EmailAddress { get; set; } + + [DisplayOrder(10003)] + public string Name { get; set; } + + [DisplayOrder(9999)] + public string City { get; set; } + } + + public class DetailedModel + { + [Required] + [Placeholder("Enter your name...")] + [Display(Name = "Name")] + public string Name { get; set; } + + [TextArea(Rows = 4)] + [Display(Name = "Description")] + [InputInfoText("Describe Yourself")] + public string Description { get; set; } + + [Required] + [DataType(DataType.Password)] + [Display(Name = "Password")] + public string Password { get; set; } + + [Display(Name = "Is Active")] + public bool IsActive { get; set; } + + [Required] + [Display(Name = "Age")] + public int Age { get; set; } + + [Required] + [Display(Name = "My Car Type")] + public CarType MyCarType { get; set; } + + [Required] + [Display(Name = "My Car Type Nullable")] + public CarType? MyCarTypeNullable { get; set; } + + [Required] + [AbpRadioButton(Inline = true)] + [Display(Name = "Your Car Type")] + public CarType YourCarType { get; set; } + + [DataType(DataType.Date)] + [Display(Name = "Day")] + public DateTime Day { get; set; } + + [SelectItems(nameof(CountryList))] + [Display(Name = "Country")] + public string Country { get; set; } + + [SelectItems(nameof(CountryList))] + [Display(Name = "Neighbor Countries")] + public List NeighborCountries { get; set; } + + [DynamicFormIgnore] + public string IgnoredProperty { get; set; } + } + + public enum CarType + { + Sedan, + Hatchback, + StationWagon, + Coupe } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/FormElements.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/FormElements.cshtml.cs index dca438d5a8..57158b5197 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/FormElements.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/FormElements.cshtml.cs @@ -7,14 +7,14 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Mvc.Rendering; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class FormElementsModel : PageModel { - public class FormElementsModel : PageModel - { - [BindProperty] - public SampleModel MyModel { get; set; } + [BindProperty] + public SampleModel MyModel { get; set; } - public List CityList { get; set; } = new List + public List CityList { get; set; } = new List { new SelectListItem { Value = "NY", Text = "New York"}, new SelectListItem { Value = "LDN", Text = "London"}, @@ -22,59 +22,58 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components new SelectListItem { Value = "MOS", Text = "Moscow"} }; - public void OnGet() - { - MyModel = new SampleModel(); - MyModel.SampleInput0 = "This is a disabled input."; - MyModel.SampleInput1 = "This is a readonly input."; - MyModel.CityRadio = "IST"; - } + public void OnGet() + { + MyModel = new SampleModel(); + MyModel.SampleInput0 = "This is a disabled input."; + MyModel.SampleInput1 = "This is a readonly input."; + MyModel.CityRadio = "IST"; + } - public class SampleModel - { - public string Name { get; set; } + public class SampleModel + { + public string Name { get; set; } - public string SampleInput0 { get; set; } + public string SampleInput0 { get; set; } - public string SampleInput1 { get; set; } + public string SampleInput1 { get; set; } - public string SampleInput2 { get; set; } + public string SampleInput2 { get; set; } - public string LargeInput { get; set; } + public string LargeInput { get; set; } - public string SmallInput { get; set; } + public string SmallInput { get; set; } - [TextArea] - public string Description { get; set; } + [TextArea] + public string Description { get; set; } - public string EmailAddress { get; set; } - - [Required] - [DataType(DataType.Password)] - public string Password { get; set; } + public string EmailAddress { get; set; } - public bool CheckMeOut { get; set; } + [Required] + [DataType(DataType.Password)] + public string Password { get; set; } - public bool DefaultCheckbox { get; set; } + public bool CheckMeOut { get; set; } - public bool DisabledCheckbox { get; set; } + public bool DefaultCheckbox { get; set; } - public CarType CarType { get; set; } + public bool DisabledCheckbox { get; set; } - public string City { get; set; } + public CarType CarType { get; set; } - [Display(Name="City")] - public string CityRadio { get; set; } + public string City { get; set; } - public List Cities { get; set; } - } + [Display(Name = "City")] + public string CityRadio { get; set; } - public enum CarType - { - Sedan, - Hatchback, - StationWagon, - Coupe - } + public List Cities { get; set; } + } + + public enum CarType + { + Sedan, + Hatchback, + StationWagon, + Coupe } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Grids.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Grids.cshtml.cs index 87e82dca94..aa4bf6fa30 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Grids.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Grids.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class GridsModel : PageModel { - public class GridsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ListGroup.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ListGroup.cshtml.cs index 9fc9581982..b55de8ea28 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ListGroup.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ListGroup.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class ListGroupsModel : PageModel { - public class ListGroupsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Modals.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Modals.cshtml.cs index ee56c38a68..a44f515e02 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Modals.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Modals.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class ModalsModel : PageModel { - public class ModalsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Navs.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Navs.cshtml.cs index 096f886654..4cfbafb89d 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Navs.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Navs.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class NavsModel : PageModel { - public class NavsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Paginator.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Paginator.cshtml.cs index 3723631381..1978102031 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Paginator.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Paginator.cshtml.cs @@ -1,15 +1,14 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class PaginatorModel : PageModel { - public class PaginatorModel : PageModel - { - public PagerModel PagerModel { get; set; } + public PagerModel PagerModel { get; set; } - public void OnGet(int currentPage, string sort) - { - PagerModel = new PagerModel(100, 10, currentPage, 10, "/Components/Paginator", sort); - } + public void OnGet(int currentPage, string sort) + { + PagerModel = new PagerModel(100, 10, currentPage, 10, "/Components/Paginator", sort); } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Popovers.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Popovers.cshtml.cs index c9b0c880c9..f19c0bd19d 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Popovers.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Popovers.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class PopoversModel : PageModel { - public class PopoversModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ProgressBars.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ProgressBars.cshtml.cs index 871fe9568e..0e067c87c2 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ProgressBars.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/ProgressBars.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class ProgressBarsModel : PageModel { - public class ProgressBarsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tables.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tables.cshtml.cs index b8252f2692..0c6275ab7e 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tables.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tables.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class TablesModel : PageModel { - public class TablesModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tabs.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tabs.cshtml.cs index cf112aeeb6..297944294b 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tabs.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tabs.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class TabsModel : PageModel { - public class TabsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tooltips.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tooltips.cshtml.cs index 0b85851880..ba274853a8 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tooltips.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Tooltips.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components; + +public class TooltipsModel : PageModel { - public class TooltipsModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Index.cshtml.cs index 68dde66bc7..41242eea2a 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Index.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs index fd9b64308f..ad3a39c746 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs @@ -5,44 +5,43 @@ using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo; + +public class Program { - public class Program + public static int Main(string[] args) { - public static int Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Debug() //TODO: Should be configurable! - .MinimumLevel.Override("Microsoft", LogEventLevel.Information) - .Enrich.FromLogContext() - .WriteTo.File("Logs/logs.txt") - .CreateLogger(); + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Debug() //TODO: Should be configurable! + .MinimumLevel.Override("Microsoft", LogEventLevel.Information) + .Enrich.FromLogContext() + .WriteTo.File("Logs/logs.txt") + .CreateLogger(); - try - { - Log.Information("Starting web host."); - CreateHostBuilder(args).Build().Run(); - return 0; - } - catch (Exception ex) - { - Log.Fatal(ex, "Host terminated unexpectedly!"); - return 1; - } - finally - { - Log.CloseAndFlush(); - } + try + { + Log.Information("Starting web host."); + CreateHostBuilder(args).Build().Run(); + return 0; } + catch (Exception ex) + { + Log.Fatal(ex, "Host terminated unexpectedly!"); + return 1; + } + finally + { + Log.CloseAndFlush(); + } + } - internal static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }) - .UseAutofac() - .UseSerilog(); - } + internal static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }) + .UseAutofac() + .UseSerilog(); } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs index 5b303d4489..838cf43402 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs @@ -2,18 +2,17 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo; + +public class Startup { - public class Startup + public void ConfigureServices(IServiceCollection services) { - public void ConfigureServices(IServiceCollection services) - { - services.AddApplication(); - } + services.AddApplication(); + } - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) - { - app.InitializeApplication(); - } + public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) + { + app.InitializeApplication(); } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/AbpAspNetCoreMvcUiThemeBasicDemoModule.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/AbpAspNetCoreMvcUiThemeBasicDemoModule.cs index 697862811f..1b1a3f3469 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/AbpAspNetCoreMvcUiThemeBasicDemoModule.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/AbpAspNetCoreMvcUiThemeBasicDemoModule.cs @@ -11,53 +11,52 @@ using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; using Volo.Abp.VirtualFileSystem; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo; + +[DependsOn( + typeof(AbpAspNetCoreMvcUiBasicThemeModule), + typeof(AbpAspNetCoreMvcUiThemeSharedDemoModule), + typeof(AbpAutofacModule) + )] +public class AbpAspNetCoreMvcUiThemeBasicDemoModule : AbpModule { - [DependsOn( - typeof(AbpAspNetCoreMvcUiBasicThemeModule), - typeof(AbpAspNetCoreMvcUiThemeSharedDemoModule), - typeof(AbpAutofacModule) - )] - public class AbpAspNetCoreMvcUiThemeBasicDemoModule : AbpModule + public override void ConfigureServices(ServiceConfigurationContext context) { - public override void ConfigureServices(ServiceConfigurationContext context) - { - var env = context.Services.GetHostingEnvironment(); - - if (env.IsDevelopment()) - { - Configure(options => - { - options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(env.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo", Path.DirectorySeparatorChar))); - }); - } + var env = context.Services.GetHostingEnvironment(); - Configure(options => - { - options.StyleBundles - .Get(StandardBundles.Styles.Global) - .AddFiles("/demo/styles/main.css"); - }); - - Configure(options => + if (env.IsDevelopment()) + { + Configure(options => { - options.MenuContributors.Add(new BasicThemeDemoMenuContributor()); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(env.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo", Path.DirectorySeparatorChar))); }); } - public override void OnApplicationInitialization(ApplicationInitializationContext context) + Configure(options => { - var app = context.GetApplicationBuilder(); - var env = context.GetEnvironment(); + options.StyleBundles + .Get(StandardBundles.Styles.Global) + .AddFiles("/demo/styles/main.css"); + }); - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } + Configure(options => + { + options.MenuContributors.Add(new BasicThemeDemoMenuContributor()); + }); + } - app.UseStaticFiles(); - app.UseRouting(); - app.UseConfiguredEndpoints(); + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); + + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); } + + app.UseStaticFiles(); + app.UseRouting(); + app.UseConfiguredEndpoints(); } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Menus/BasicThemeDemoMenuContributor.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Menus/BasicThemeDemoMenuContributor.cs index 78ad905b7c..0173e6d27a 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Menus/BasicThemeDemoMenuContributor.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Menus/BasicThemeDemoMenuContributor.cs @@ -3,25 +3,25 @@ using System.Linq; using System.Threading.Tasks; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Menus +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Menus; + +public class BasicThemeDemoMenuContributor : IMenuContributor { - public class BasicThemeDemoMenuContributor : IMenuContributor + public Task ConfigureMenuAsync(MenuConfigurationContext context) { - public Task ConfigureMenuAsync(MenuConfigurationContext context) + if (context.Menu.Name == StandardMenus.Main) { - if(context.Menu.Name == StandardMenus.Main) - { - AddMainMenuItems(context); - } - - return Task.CompletedTask; + AddMainMenuItems(context); } - private void AddMainMenuItems(MenuConfigurationContext context) - { - var menuItem = new ApplicationMenuItem(BasicThemeDemoMenus.Components.Root, "Components"); + return Task.CompletedTask; + } - var items = new List() + private void AddMainMenuItems(MenuConfigurationContext context) + { + var menuItem = new ApplicationMenuItem(BasicThemeDemoMenus.Components.Root, "Components"); + + var items = new List() { new ApplicationMenuItem(BasicThemeDemoMenus.Components.Alerts, "Alerts", url: "/Components/Alerts"), new ApplicationMenuItem(BasicThemeDemoMenus.Components.Badges, "Badges", url: "/Components/Badges"), @@ -47,12 +47,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Menus new ApplicationMenuItem(BasicThemeDemoMenus.Components.Tabs, "Tabs", url: "/Components/Tabs"), new ApplicationMenuItem(BasicThemeDemoMenus.Components.Tooltips, "Tooltips", url: "/Components/Tooltips") }; - - items.OrderBy(x => x.Name) - .ToList() - .ForEach(x => menuItem.AddItem(x)); - context.Menu.AddItem(menuItem); - } + items.OrderBy(x => x.Name) + .ToList() + .ForEach(x => menuItem.AddItem(x)); + + context.Menu.AddItem(menuItem); } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Menus/BasicThemeDemoMenus.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Menus/BasicThemeDemoMenus.cs index c1dfb1bde4..2aeaf7b51c 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Menus/BasicThemeDemoMenus.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Menus/BasicThemeDemoMenus.cs @@ -1,36 +1,35 @@ -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Menus +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Menus; + +public class BasicThemeDemoMenus { - public class BasicThemeDemoMenus - { - private const string Prefix = "BasicThemeDemo"; - public const string Home = Prefix + ".Home"; + private const string Prefix = "BasicThemeDemo"; + public const string Home = Prefix + ".Home"; - public static class Components - { - public const string Root = Prefix + ".Components"; - public const string Alerts = Root + ".Alerts"; - public const string Badges = Root + ".Badges"; - public const string Borders = Root + ".Borders"; - public const string Breadcrumbs = Root + ".Breadcrumbs"; - public const string ButtonGroups = Root + ".ButtonGroups"; - public const string Buttons = Root + ".Buttons"; - public const string Cards = Root + ".Cards"; - public const string Carousel = Root + ".Carousel"; - public const string Collapse = Root + ".Collapse"; - public const string Dropdowns = Root + ".Dropdowns"; - public const string DynamicForms = Root + ".DynamicForms"; - public const string FormElements = Root + ".FormElements"; - public const string Grids = Root + ".Grids"; - public const string ListGroups = Root + ".ListGroups"; - public const string Modals = Root + ".Modals"; - public const string Navbars = Root + ".Navbars"; - public const string Navs = Root + ".Navs"; - public const string Paginator = Root + ".Paginator"; - public const string Popovers = Root + ".Popovers"; - public const string ProgressBars = Root + ".ProgressBars"; - public const string Tables = Root + ".Tables"; - public const string Tabs = Root + ".Tabs"; - public const string Tooltips = Root + ".Tooltips"; - } + public static class Components + { + public const string Root = Prefix + ".Components"; + public const string Alerts = Root + ".Alerts"; + public const string Badges = Root + ".Badges"; + public const string Borders = Root + ".Borders"; + public const string Breadcrumbs = Root + ".Breadcrumbs"; + public const string ButtonGroups = Root + ".ButtonGroups"; + public const string Buttons = Root + ".Buttons"; + public const string Cards = Root + ".Cards"; + public const string Carousel = Root + ".Carousel"; + public const string Collapse = Root + ".Collapse"; + public const string Dropdowns = Root + ".Dropdowns"; + public const string DynamicForms = Root + ".DynamicForms"; + public const string FormElements = Root + ".FormElements"; + public const string Grids = Root + ".Grids"; + public const string ListGroups = Root + ".ListGroups"; + public const string Modals = Root + ".Modals"; + public const string Navbars = Root + ".Navbars"; + public const string Navs = Root + ".Navs"; + public const string Paginator = Root + ".Paginator"; + public const string Popovers = Root + ".Popovers"; + public const string ProgressBars = Root + ".ProgressBars"; + public const string Tables = Root + ".Tables"; + public const string Tabs = Root + ".Tabs"; + public const string Tooltips = Root + ".Tooltips"; } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Alerts/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Alerts/Index.cshtml.cs index 1187dc021a..c2463b03df 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Alerts/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Alerts/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Alerts +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Alerts; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Badges/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Badges/Index.cshtml.cs index 75067fcc35..27b50dcbb9 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Badges/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Badges/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Badges +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Badges; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Borders/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Borders/Index.cshtml.cs index 65ec1dc8dd..4f0431f9ba 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Borders/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Borders/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Borders +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Borders; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Breadcrumbs/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Breadcrumbs/Index.cshtml.cs index e4f35e84a6..3ee9e771f3 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Breadcrumbs/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Breadcrumbs/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Breadcrumbs +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Breadcrumbs; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ButtonGroups/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ButtonGroups/Index.cshtml.cs index fcc91c386b..3c27db38c1 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ButtonGroups/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ButtonGroups/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.ButtonGroups +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.ButtonGroups; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Buttons/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Buttons/Index.cshtml.cs index e9417a5eee..69248a74be 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Buttons/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Buttons/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Buttons +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Buttons; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Cards/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Cards/Index.cshtml.cs index 94761d1828..d166a0a852 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Cards/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Cards/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Cards +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Cards; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Carousel/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Carousel/Index.cshtml.cs index e4926f5ac0..93aa5fdd5b 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Carousel/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Carousel/Index.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Carousel +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Carousel; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Collapse/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Collapse/Index.cshtml.cs index afaaf65d10..a3b81f4833 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Collapse/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Collapse/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Collapse +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Collapse; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Dropdowns/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Dropdowns/Index.cshtml.cs index 6d27a631d4..bd25a09a8f 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Dropdowns/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Dropdowns/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Dropdowns +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Dropdowns; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/DynamicForms/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/DynamicForms/Index.cshtml.cs index a9413ce767..c6606d0d35 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/DynamicForms/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/DynamicForms/Index.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.DynamicForms +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.DynamicForms; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/FormElements/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/FormElements/Index.cshtml.cs index a2864fed98..9eafeecf34 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/FormElements/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/FormElements/Index.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.FormElements +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.FormElements; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Grids/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Grids/Index.cshtml.cs index e8d829cf52..7c850e73b2 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Grids/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Grids/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Grids +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Grids; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Index.cshtml.cs index 426c578a43..f14d2e7cf1 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Index.cshtml.cs @@ -3,20 +3,19 @@ using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Menus; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components; + +public class IndexModel : AbpPageModel { - public class IndexModel : AbpPageModel - { - public readonly IMenuManager _menuManager; + public readonly IMenuManager _menuManager; - public IndexModel(IMenuManager menuManager) - { - _menuManager = menuManager; - } + public IndexModel(IMenuManager menuManager) + { + _menuManager = menuManager; + } - public void OnGet() - { + public void OnGet() + { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ListGroups/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ListGroups/Index.cshtml.cs index 9f324dcbb0..72c61abc1f 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ListGroups/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ListGroups/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.ListGroups +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.ListGroups; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Modals/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Modals/Index.cshtml.cs index 35749b0832..543fa76316 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Modals/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Modals/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Modals +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Modals; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Navbars/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Navbars/Index.cshtml.cs index c2814e6686..3e6313ab9f 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Navbars/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Navbars/Index.cshtml.cs @@ -5,13 +5,12 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Navs/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Navs/Index.cshtml.cs index e9f901052f..0812e8a40f 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Navs/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Navs/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Navs +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Navs; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Paginator/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Paginator/Index.cshtml.cs index bc51f80f0a..830fbce3e8 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Paginator/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Paginator/Index.cshtml.cs @@ -1,15 +1,14 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Paginator +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Paginator; + +public class IndexModel : PageModel { - public class IndexModel : PageModel - { - public PagerModel PagerModel { get; set; } + public PagerModel PagerModel { get; set; } - public void OnGet(int currentPage = 1, string sort = null) - { - PagerModel = new PagerModel(100, 10, currentPage, 10, "/Components/Paginator", sort); - } + public void OnGet(int currentPage = 1, string sort = null) + { + PagerModel = new PagerModel(100, 10, currentPage, 10, "/Components/Paginator", sort); } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Popovers/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Popovers/Index.cshtml.cs index 6bb055517b..e8bd631b78 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Popovers/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Popovers/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Popovers +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Popovers; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ProgressBars/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ProgressBars/Index.cshtml.cs index e2be5ad928..bc5a6e66d8 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ProgressBars/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/ProgressBars/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.ProgressBars +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.ProgressBars; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tables/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tables/Index.cshtml.cs index 84289beeff..96b631f622 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tables/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tables/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Tables +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Tables; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tabs/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tabs/Index.cshtml.cs index 62f727d427..17e5935a9b 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tabs/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tabs/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Tabs +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Tabs; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tooltips/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tooltips/Index.cshtml.cs index 8f5170c171..a69fdc3d28 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tooltips/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Components/Tooltips/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Tooltips +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.Tooltips; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Index.cshtml.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Index.cshtml.cs index 8d1eec93d4..499963fd62 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Index.cshtml.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Pages/Index.cshtml.cs @@ -1,12 +1,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages; + +public class IndexModel : PageModel { - public class IndexModel : PageModel + public void OnGet() { - public void OnGet() - { - } } -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Program.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Program.cs index d779a77eb3..a27f797715 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Program.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Program.cs @@ -4,44 +4,43 @@ using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo; + +public class Program { - public class Program + public static int Main(string[] args) { - public static int Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Debug() - .Enrich.FromLogContext() - .WriteTo.Async(c => c.File("Logs/logs.txt")) - .WriteTo.Async(c => c.Console()) - .CreateLogger(); + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Debug() + .Enrich.FromLogContext() + .WriteTo.Async(c => c.File("Logs/logs.txt")) + .WriteTo.Async(c => c.Console()) + .CreateLogger(); - try - { - Log.Information("Starting web host."); - CreateHostBuilder(args).Build().Run(); - return 0; - } - catch (Exception ex) - { - Log.Fatal(ex, "Host terminated unexpectedly!"); - return 1; - } - finally - { - Log.CloseAndFlush(); - } + try + { + Log.Information("Starting web host."); + CreateHostBuilder(args).Build().Run(); + return 0; } + catch (Exception ex) + { + Log.Fatal(ex, "Host terminated unexpectedly!"); + return 1; + } + finally + { + Log.CloseAndFlush(); + } + } - internal static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }) - .UseAutofac() - .UseSerilog(); - } + internal static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }) + .UseAutofac() + .UseSerilog(); } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Startup.cs b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Startup.cs index 8c6a9c08de..a11ca855da 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Startup.cs +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Startup.cs @@ -2,18 +2,17 @@ using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo; + +public class Startup { - public class Startup + public void ConfigureServices(IServiceCollection services) { - public void ConfigureServices(IServiceCollection services) - { - services.AddApplication(); - } + services.AddApplication(); + } - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) - { - app.InitializeApplication(); - } + public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) + { + app.InitializeApplication(); } -} \ No newline at end of file +}