Browse Source
Merge pull request #15314 from abpframework/auto-merge/rel-7-0/1634
Merge branch dev with rel-7.0
pull/15334/head
maliming
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
20 additions and
9 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs
-
framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureCheckerBase.cs
-
framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinition.cs
-
modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureDefinitionRecord.cs
-
modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/AbpFeatureManagementEntityFrameworkCoreTestModule.cs
|
|
@ -182,7 +182,12 @@ public class VoloNugetPackagesVersionUpdater : ITransientDependency |
|
|
|
|
|
|
|
|
var versionAttribute = package.Attributes["Version"]; |
|
|
var versionAttribute = package.Attributes["Version"]; |
|
|
var currentVersion = versionAttribute.Value; |
|
|
var currentVersion = versionAttribute.Value; |
|
|
var currentSemanticVersion = SemanticVersion.Parse(currentVersion); |
|
|
var isVersionParsed = SemanticVersion.TryParse(currentVersion, out var currentSemanticVersion); |
|
|
|
|
|
if (!isVersionParsed) |
|
|
|
|
|
{ |
|
|
|
|
|
Logger.LogWarning("Could not parse package \"{0}\" version v{1}. Skipped.", packageId, currentVersion); |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var isLeptonXPackage = packageId.Contains("LeptonX"); |
|
|
var isLeptonXPackage = packageId.Contains("LeptonX"); |
|
|
|
|
|
|
|
|
|
|
|
@ -11,7 +11,7 @@ public abstract class FeatureCheckerBase : IFeatureChecker, ITransientDependency |
|
|
public virtual async Task<bool> IsEnabledAsync(string name) |
|
|
public virtual async Task<bool> IsEnabledAsync(string name) |
|
|
{ |
|
|
{ |
|
|
var value = await GetOrNullAsync(name); |
|
|
var value = await GetOrNullAsync(name); |
|
|
if (value == null) |
|
|
if (value.IsNullOrEmpty()) |
|
|
{ |
|
|
{ |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
@ -100,11 +100,11 @@ public class FeatureDefinition : ICanCreateChildFeature |
|
|
bool isVisibleToClients = true, |
|
|
bool isVisibleToClients = true, |
|
|
bool isAvailableToHost = true) |
|
|
bool isAvailableToHost = true) |
|
|
{ |
|
|
{ |
|
|
Name = name; |
|
|
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
|
|
DefaultValue = defaultValue; |
|
|
DefaultValue = defaultValue; |
|
|
DisplayName = displayName ?? new FixedLocalizableString(name); |
|
|
DisplayName = displayName ?? new FixedLocalizableString(name); |
|
|
Description = description; |
|
|
Description = description; |
|
|
ValueType = valueType; |
|
|
ValueType = valueType ?? new ToggleStringValueType(); |
|
|
IsVisibleToClients = isVisibleToClients; |
|
|
IsVisibleToClients = isVisibleToClients; |
|
|
IsAvailableToHost = isAvailableToHost; |
|
|
IsAvailableToHost = isAvailableToHost; |
|
|
|
|
|
|
|
|
|
|
|
@ -70,7 +70,7 @@ public class FeatureDefinitionRecord : BasicAggregateRoot<Guid>, IHasExtraProper |
|
|
DisplayName = Check.NotNullOrWhiteSpace(displayName, nameof(displayName), FeatureDefinitionRecordConsts.MaxDisplayNameLength); |
|
|
DisplayName = Check.NotNullOrWhiteSpace(displayName, nameof(displayName), FeatureDefinitionRecordConsts.MaxDisplayNameLength); |
|
|
|
|
|
|
|
|
Description = Check.Length(description, nameof(description), FeatureDefinitionRecordConsts.MaxDescriptionLength); |
|
|
Description = Check.Length(description, nameof(description), FeatureDefinitionRecordConsts.MaxDescriptionLength); |
|
|
DefaultValue = Check.NotNullOrWhiteSpace(defaultValue, nameof(defaultValue), FeatureDefinitionRecordConsts.MaxDefaultValueLength); |
|
|
DefaultValue = Check.Length(defaultValue, nameof(defaultValue), FeatureDefinitionRecordConsts.MaxDefaultValueLength); |
|
|
|
|
|
|
|
|
IsVisibleToClients = isVisibleToClients; |
|
|
IsVisibleToClients = isVisibleToClients; |
|
|
IsAvailableToHost = isAvailableToHost; |
|
|
IsAvailableToHost = isAvailableToHost; |
|
|
|
|
|
@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore.Storage; |
|
|
using Volo.Abp.EntityFrameworkCore; |
|
|
using Volo.Abp.EntityFrameworkCore; |
|
|
using Volo.Abp.EntityFrameworkCore.Sqlite; |
|
|
using Volo.Abp.EntityFrameworkCore.Sqlite; |
|
|
using Volo.Abp.Modularity; |
|
|
using Volo.Abp.Modularity; |
|
|
|
|
|
using Volo.Abp.Uow; |
|
|
|
|
|
|
|
|
namespace Volo.Abp.FeatureManagement.EntityFrameworkCore; |
|
|
namespace Volo.Abp.FeatureManagement.EntityFrameworkCore; |
|
|
|
|
|
|
|
|
@ -26,6 +27,11 @@ public class AbpFeatureManagementEntityFrameworkCoreTestModule : AbpModule |
|
|
abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); |
|
|
abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
Configure<AbpUnitOfWorkDefaultOptions>(options => |
|
|
|
|
|
{ |
|
|
|
|
|
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static SqliteConnection CreateDatabaseAndGetConnection() |
|
|
private static SqliteConnection CreateDatabaseAndGetConnection() |
|
|
|