Пример #1
0
 public void TestInitailize()
 {
     scope = AutofacContainer.GetLifetimeScope();
     List  = scope.Resolve <IValidateAsyncObjectList>();
     Child = scope.Resolve <IValidateAsyncObject>();
     List.Add(Child);
 }
Пример #2
0
        public void TestInitailize()
        {
            scope = AutofacContainer.GetLifetimeScope();
            var validateDto = scope.Resolve <IReadOnlyList <PersonDto> >().Where(p => !p.FatherId.HasValue && !p.MotherId.HasValue).First();

            validate       = scope.Resolve <IValidateAsyncObject>();
            child          = scope.Resolve <IValidateAsyncObject>();
            validate.Child = child;
        }
Пример #3
0
        public async Task Fetch(PersonDto person, IReceivePortalChild <IValidateAsyncObject> portal, IReadOnlyList <PersonDto> personTable)
        {
            base.FillFromDto(person);

            var childDto = personTable.FirstOrDefault(p => p.FatherId == Id);

            if (childDto != null)
            {
                Child = await portal.FetchChild(childDto);
            }
        }