using Volo.Abp.Modularity; using Volo.Abp.ObjectExtending.TestObjects; using Volo.Abp.Threading; namespace Volo.Abp.ObjectExtending { [DependsOn( typeof(AbpObjectExtendingModule), typeof(AbpTestBaseModule) )] public class AbpObjectExtendingTestModule : AbpModule { private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); public override void PreConfigureServices(ServiceConfigurationContext context) { OneTimeRunner.Run(() => { ObjectExtensionManager.Instance .AddOrUpdateProperty("Name") .AddOrUpdateProperty("Age") .AddOrUpdateProperty("NoPairCheck", options => options.CheckPairDefinitionOnMapping = false) .AddOrUpdateProperty("CityName") .AddOrUpdateProperty("Name") .AddOrUpdateProperty("ChildCount") .AddOrUpdateProperty("CityName"); }); } } }