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.
25 lines
989 B
25 lines
989 B
3 years ago
|
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)));
|
||
|
}
|
||
|
}
|