From be3afe8dd2d6839fa8aca816c8b48b1b0752a433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 15 Mar 2018 10:45:02 +0300 Subject: [PATCH] Added todo and renamed MemoryDatabase._idGenerators --- .../Navigation/AbpIdentityWebMainMenuContributor.cs | 1 + .../Volo/Abp/Domain/Repositories/MemoryDb/MemoryDatabase.cs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs b/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs index d7ce55226f..2f0fb56892 100644 --- a/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs +++ b/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs @@ -16,6 +16,7 @@ namespace Volo.Abp.Identity.Web.Navigation var permissionChecker = context.ServiceProvider.GetRequiredService(); + //TODO: We should not add this if none of the children available. Alternatively, we can handle it on menu rendering (would be simpler). var identityMenuItem = new ApplicationMenuItem("Identity", "Identity"); context.Menu.AddItem(identityMenuItem); diff --git a/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDatabase.cs b/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDatabase.cs index 212c151087..be16beef85 100644 --- a/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDatabase.cs +++ b/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDatabase.cs @@ -8,12 +8,12 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb { private readonly ConcurrentDictionary _sets; - private readonly ConcurrentDictionary _idGenerators; + private readonly ConcurrentDictionary _entityIdGenerators; public MemoryDatabase() { _sets = new ConcurrentDictionary(); - _idGenerators = new ConcurrentDictionary(); + _entityIdGenerators = new ConcurrentDictionary(); } public List Collection() @@ -23,7 +23,7 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb public TKey GenerateNextId() { - return _idGenerators + return _entityIdGenerators .GetOrAdd(typeof(TEntity), () => new InMemoryIdGenerator()) .GenerateNext(); }