Browse Source

NavigationOptions to AbpNavigationOptions

pull/1919/head
Yunus Emre Kalkan 7 years ago
parent
commit
df386b9ba7
  1. 4
      framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpNavigationOptions.cs
  2. 2
      framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpUiNavigationModule.cs
  3. 4
      framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs
  4. 2
      framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs
  5. 2
      modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs
  6. 2
      modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs
  7. 2
      modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs
  8. 2
      modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs
  9. 2
      modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs
  10. 2
      modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs
  11. 2
      samples/BookStore-Modular/application/src/Acme.BookStore.Web/BookStoreWebModule.cs
  12. 2
      samples/BookStore-Modular/application/test/Acme.BookStore.Web.Tests/BookStoreWebTestModule.cs
  13. 2
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Web/BookManagementWebModule.cs
  14. 2
      samples/BookStore/src/Acme.BookStore.Web/BookStoreWebModule.cs
  15. 2
      samples/BookStore/test/Acme.BookStore.Web.Tests/BookStoreWebTestModule.cs
  16. 2
      samples/DashboardDemo/src/DashboardDemo.Web/DashboardDemoWebModule.cs
  17. 2
      samples/DashboardDemo/test/DashboardDemo.Web.Tests/DashboardDemoWebTestModule.cs
  18. 2
      samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs
  19. 2
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagementWebModule.cs
  20. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs
  21. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs
  22. 2
      templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Web.Tests/MyProjectNameWebTestModule.cs
  23. 2
      templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs

4
framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/NavigationOptions.cs → framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpNavigationOptions.cs

@ -3,12 +3,12 @@ using JetBrains.Annotations;
namespace Volo.Abp.UI.Navigation namespace Volo.Abp.UI.Navigation
{ {
public class NavigationOptions public class AbpNavigationOptions
{ {
[NotNull] [NotNull]
public List<IMenuContributor> MenuContributors { get; } public List<IMenuContributor> MenuContributors { get; }
public NavigationOptions() public AbpNavigationOptions()
{ {
MenuContributors = new List<IMenuContributor>(); MenuContributors = new List<IMenuContributor>();
} }

2
framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/AbpUiNavigationModule.cs

@ -23,7 +23,7 @@ namespace Volo.Abp.UI.Navigation
.AddVirtualJson("/Volo/Abp/Ui/Navigation/Localization/Resource"); .AddVirtualJson("/Volo/Abp/Ui/Navigation/Localization/Resource");
}); });
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new DefaultMenuContributor()); options.MenuContributors.Add(new DefaultMenuContributor());
}); });

4
framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs

@ -9,11 +9,11 @@ namespace Volo.Abp.UI.Navigation
{ {
public class MenuManager : IMenuManager, ITransientDependency public class MenuManager : IMenuManager, ITransientDependency
{ {
protected NavigationOptions Options { get; } protected AbpNavigationOptions Options { get; }
protected IHybridServiceScopeFactory ServiceScopeFactory { get; } protected IHybridServiceScopeFactory ServiceScopeFactory { get; }
public MenuManager( public MenuManager(
IOptions<NavigationOptions> options, IOptions<AbpNavigationOptions> options,
IHybridServiceScopeFactory serviceScopeFactory) IHybridServiceScopeFactory serviceScopeFactory)
{ {
ServiceScopeFactory = serviceScopeFactory; ServiceScopeFactory = serviceScopeFactory;

2
framework/test/Volo.Abp.UI.Navigation.Tests/Volo/Abp/Ui/Navigation/MenuManager_Tests.cs

@ -39,7 +39,7 @@ namespace Volo.Abp.UI.Navigation
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new TestMenuContributor1()); options.MenuContributors.Add(new TestMenuContributor1());
options.MenuContributors.Add(new TestMenuContributor2()); options.MenuContributors.Add(new TestMenuContributor2());

2
modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs

@ -40,7 +40,7 @@ namespace Volo.Abp.Account.Web
options.FileSets.AddEmbedded<AbpAccountWebModule>("Volo.Abp.Account.Web"); options.FileSets.AddEmbedded<AbpAccountWebModule>("Volo.Abp.Account.Web");
}); });
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new AbpAccountUserMenuContributor()); options.MenuContributors.Add(new AbpAccountUserMenuContributor());
}); });

2
modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs

@ -35,7 +35,7 @@ namespace Volo.Blogging
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new BloggingMenuContributor()); options.MenuContributors.Add(new BloggingMenuContributor());
}); });

2
modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs

@ -36,7 +36,7 @@ namespace Volo.Docs.Admin
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new DocsMenuContributor()); options.MenuContributors.Add(new DocsMenuContributor());
}); });

2
modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs

@ -35,7 +35,7 @@ namespace Volo.Abp.Identity.Web
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new AbpIdentityWebMainMenuContributor()); options.MenuContributors.Add(new AbpIdentityWebMainMenuContributor());
}); });

2
modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs

@ -23,7 +23,7 @@ namespace Volo.Abp.SettingManagement.Web
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new SettingManagementMainMenuContributor()); options.MenuContributors.Add(new SettingManagementMainMenuContributor());
}); });

2
modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs

@ -37,7 +37,7 @@ namespace Volo.Abp.TenantManagement.Web
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new AbpTenantManagementWebMainMenuContributor()); options.MenuContributors.Add(new AbpTenantManagementWebMainMenuContributor());
}); });

2
samples/BookStore-Modular/application/src/Acme.BookStore.Web/BookStoreWebModule.cs

@ -147,7 +147,7 @@ namespace Acme.BookStore.Web
private void ConfigureNavigationServices() private void ConfigureNavigationServices()
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new BookStoreMenuContributor()); options.MenuContributors.Add(new BookStoreMenuContributor());
}); });

2
samples/BookStore-Modular/application/test/Acme.BookStore.Web.Tests/BookStoreWebTestModule.cs

@ -62,7 +62,7 @@ namespace Acme.BookStore
private static void ConfigureNavigationServices(IServiceCollection services) private static void ConfigureNavigationServices(IServiceCollection services)
{ {
services.Configure<NavigationOptions>(options => services.Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new BookStoreMenuContributor()); options.MenuContributors.Add(new BookStoreMenuContributor());
}); });

2
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Web/BookManagementWebModule.cs

@ -27,7 +27,7 @@ namespace Acme.BookStore.BookManagement.Web
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new BookManagementMenuContributor()); options.MenuContributors.Add(new BookManagementMenuContributor());
}); });

2
samples/BookStore/src/Acme.BookStore.Web/BookStoreWebModule.cs

@ -139,7 +139,7 @@ namespace Acme.BookStore.Web
private void ConfigureNavigationServices() private void ConfigureNavigationServices()
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new BookStoreMenuContributor()); options.MenuContributors.Add(new BookStoreMenuContributor());
}); });

2
samples/BookStore/test/Acme.BookStore.Web.Tests/BookStoreWebTestModule.cs

@ -62,7 +62,7 @@ namespace Acme.BookStore
private static void ConfigureNavigationServices(IServiceCollection services) private static void ConfigureNavigationServices(IServiceCollection services)
{ {
services.Configure<NavigationOptions>(options => services.Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new BookStoreMenuContributor()); options.MenuContributors.Add(new BookStoreMenuContributor());
}); });

2
samples/DashboardDemo/src/DashboardDemo.Web/DashboardDemoWebModule.cs

@ -146,7 +146,7 @@ namespace DashboardDemo.Web
private void ConfigureNavigationServices() private void ConfigureNavigationServices()
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new DashboardDemoMenuContributor()); options.MenuContributors.Add(new DashboardDemoMenuContributor());
}); });

2
samples/DashboardDemo/test/DashboardDemo.Web.Tests/DashboardDemoWebTestModule.cs

@ -62,7 +62,7 @@ namespace DashboardDemo
private static void ConfigureNavigationServices(IServiceCollection services) private static void ConfigureNavigationServices(IServiceCollection services)
{ {
services.Configure<NavigationOptions>(options => services.Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new DashboardDemoMenuContributor()); options.MenuContributors.Add(new DashboardDemoMenuContributor());
}); });

2
samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs

@ -40,7 +40,7 @@ namespace PublicWebSite.Host
options.Languages.Add(new LanguageInfo("en", "en", "English")); options.Languages.Add(new LanguageInfo("en", "en", "English"));
}); });
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new PublicWebSiteMenuContributor()); options.MenuContributors.Add(new PublicWebSiteMenuContributor());
}); });

2
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagementWebModule.cs

@ -28,7 +28,7 @@ namespace ProductManagement
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new ProductManagementMenuContributor()); options.MenuContributors.Add(new ProductManagementMenuContributor());
}); });

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs

@ -171,7 +171,7 @@ namespace MyCompanyName.MyProjectName.Web
private void ConfigureNavigationServices(IConfigurationRoot configuration) private void ConfigureNavigationServices(IConfigurationRoot configuration)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new MyProjectNameMenuContributor(configuration)); options.MenuContributors.Add(new MyProjectNameMenuContributor(configuration));
}); });

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs

@ -159,7 +159,7 @@ namespace MyCompanyName.MyProjectName.Web
private void ConfigureNavigationServices() private void ConfigureNavigationServices()
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new MyProjectNameMenuContributor()); options.MenuContributors.Add(new MyProjectNameMenuContributor());
}); });

2
templates/app/aspnet-core/test/MyCompanyName.MyProjectName.Web.Tests/MyProjectNameWebTestModule.cs

@ -62,7 +62,7 @@ namespace MyCompanyName.MyProjectName
private static void ConfigureNavigationServices(IServiceCollection services) private static void ConfigureNavigationServices(IServiceCollection services)
{ {
services.Configure<NavigationOptions>(options => services.Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new MyProjectNameMenuContributor()); options.MenuContributors.Add(new MyProjectNameMenuContributor());
}); });

2
templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs

@ -32,7 +32,7 @@ namespace MyCompanyName.MyProjectName.Web
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<NavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {
options.MenuContributors.Add(new MyProjectNameMenuContributor()); options.MenuContributors.Add(new MyProjectNameMenuContributor());
}); });

Loading…
Cancel
Save