예제 #1
0
        private void DoMemberSetters()
        {
            var unconstructed = CurrentObject.UnconstructedMembers
                                .Select(member => new {
                Member = member,
                Setter = _builder.MemberSetters.FirstOrDefault(setter => setter.IsForMember(member, Builder, this))
            }).Where(e => e.Setter != null).ToList();

            foreach (var member in unconstructed)
            {
                CurrentObject.RegisterConstructed(member.Member);
            }
            foreach (var member in unconstructed)
            {
                using (PushMember(member.Member))
                {
                    member.Setter.Set(CurrentObject.Object, Builder, this);
                }
            }
        }