Exemple #1
0
        protected CompositeMemberConfig ReadCompositeMemberConfig(XElement memberElement, IMap <String, MemberConfig> allIdMemberConfigs)
        {
            IEnumerable <XElement> idFragmentNodes = GetDescendants(memberElement, XmlConstants.ID_FRAGMENT);
            IList <XElement>       idFragments     = XmlConfigUtil.NodesToElements(idFragmentNodes);

            MemberConfig[] memberConfigs = new MemberConfig[idFragments.Count];
            for (int i = 0; i < idFragments.Count; i++)
            {
                XElement     idFragment   = idFragments[i];
                String       memberName   = XmlConfigUtil.GetRequiredAttribute(idFragment, XmlConstants.NAME);
                MemberConfig memberConfig = allIdMemberConfigs.Get(memberName);
                if (memberConfig == null)
                {
                    memberConfig = ReadMemberConfig(idFragment);
                    allIdMemberConfigs.Put(memberName, memberConfig);
                }
                memberConfigs[i] = memberConfig;
            }
            CompositeMemberConfig compositeMemberConfig = new CompositeMemberConfig(memberConfigs);

            return(compositeMemberConfig);
        }