Abp模块
abp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
989 B

using Volo.Abp.Features;
using Volo.Abp.Validation.StringValues;
namespace BookStore.Features;
public class FakeFeatureDefinitionProvider : FeatureDefinitionProvider
{
public override void Define(IFeatureDefinitionContext context)
{
var featureGroup = context.AddGroup(FakeFeatureNames.GroupName);
featureGroup.AddFeature(
name: FakeFeatureNames.ClassLimitFeature,
defaultValue: 1000.ToString(),
valueType: new ToggleStringValueType(new NumericValueValidator(1, 1000)));
featureGroup.AddFeature(
name: FakeFeatureNames.MethodLimitFeature,
defaultValue: 3.ToString(),
valueType: new ToggleStringValueType(new NumericValueValidator(1, 1000)));
featureGroup.AddFeature(
name: FakeFeatureNames.IntervalFeature,
defaultValue: 1.ToString(), // 限制周期
valueType: new ToggleStringValueType(new NumericValueValidator(1, 1000)));
}
}