public void TestInitailize() { scope = AutofacContainer.GetLifetimeScope(); List = scope.Resolve <IValidateAsyncObjectList>(); Child = scope.Resolve <IValidateAsyncObject>(); List.Add(Child); }
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; }
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); } }