public void AddMemberChildrenSet(string uniqueName, bool IfLeafAddItself) { SchemaMembers smems=Schema.GetSchemaMembers(this, new string [] { uniqueName }); if(smems.Count>0) { if(smems[0].IsLeaf) this.AddMember(smems[0], true); else { MemberChildrenSet mcs=new MemberChildrenSet(null, this, smems[0]); this.AddMember(mcs, true); } } }
public void AddMemberChildren(string Identifier, bool AutoSelect) { SchemaMember parentMem=SchemaMemberFromIdentifier(Identifier); if(parentMem==null) throw new Exception("Error: invalid identifier"); Hierarchy hier=parentMem.Hierarchy; if(AutoSelect) { // remove children first this.RemoveMemberChildren(Identifier); // add children set MemberChildrenSet mcs=new MemberChildrenSet(null, hier, parentMem); hier.AddMember(mcs, true); } else { for(int i=0;i<parentMem.Children.Count;i++) hier.AddMember(parentMem.Children[i], true); } }
public MemberChildrenSet AddGrandParentChildrenSet(string uniqueName) { SchemaMember smem=Schema.GetMemberGrandParent(this, uniqueName); if(smem==null) // this means parent grandpa is hierarchy return null; else { MemberChildrenSet mcs=new MemberChildrenSet(null, this, smem); this.AddMember(mcs, true); return mcs; } }