mirror of https://github.com/abpframework/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.
28 lines
940 B
28 lines
940 B
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<ExtensibleTestPerson, string>("Name")
|
|
.AddOrUpdateProperty<ExtensibleTestPerson, int>("Age")
|
|
.AddOrUpdateProperty<ExtensibleTestPersonDto, string>("Name")
|
|
.AddOrUpdateProperty<ExtensibleTestPersonDto, int>("ChildCount");
|
|
});
|
|
}
|
|
}
|
|
}
|