コード例 #1
0
 public void TestInitailize()
 {
     scope = AutofacContainer.GetLifetimeScope();
     List  = scope.Resolve <IValidateObjectList>();
     Child = scope.Resolve <IValidateObject>();
     List.Add(Child);
 }
コード例 #2
0
 public void TestInitailize()
 {
     scope          = AutofacContainer.GetLifetimeScope();
     validate       = scope.Resolve <IValidateObject>();
     child          = scope.Resolve <IValidateObject>();
     validate.Child = child;
 }
コード例 #3
0
 public void TestInitailize()
 {
     scope       = AutofacContainer.GetLifetimeScope().Resolve <IServiceScope>();
     target      = scope.Resolve <IValidateObject>();
     target.ID   = Id;
     target.Name = Name;
     resolver    = scope.Resolve <FatClientContractResolver>();
 }
コード例 #4
0
ファイル: ValidateObject.cs プロジェクト: keithdv/OOBehave
        public async Task Fetch(PersonDto person, IReceivePortalChild <IValidateObject> portal, IReadOnlyList <PersonDto> personTable)
        {
            base.FillFromDto(person);

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

            if (childDto != null)
            {
                Child = await portal.FetchChild(childDto);
            }
        }
コード例 #5
0
        public void TestInitailize()
        {
            scope       = AutofacContainer.GetLifetimeScope().Resolve <IServiceScope>();
            target      = scope.Resolve <IValidateObjectList>();
            target.ID   = Id;
            target.Name = Name;
            resolver    = scope.Resolve <FatClientContractResolver>();

            child      = scope.Resolve <IValidateObject>();
            child.ID   = Guid.NewGuid();
            child.Name = Guid.NewGuid().ToString();
            target.Add(child);
        }