// copy constructor public NcGroupAtt(NcGroupAtt rhs) : base(rhs) { }
public Dictionary<string, NcGroupAtt> GetAtts(Location location=Location.Current) { CheckNull(); Dictionary<string, NcGroupAtt> ncAtts = new Dictionary<string, NcGroupAtt>(); if(LocationIsCurrentGroup(location)) { int attCount = GetAttCount(); for(int i=0;i<attCount;i++) { NcGroupAtt tmpGroupAtt = new NcGroupAtt(this, i); ncAtts.Add(tmpGroupAtt.GetName(), tmpGroupAtt); } } if(LocationIsParentGroup(location)) { Dictionary<string, NcGroup> groups = GetGroups(GroupLocation.ParentsGrps); foreach(KeyValuePair<string, NcGroup> g in groups) { g.Value.GetAtts().ToList().ForEach(x => ncAtts[x.Key] = x.Value); } } if(LocationIsChildGroup(location)) { Dictionary<string, NcGroup> groups = GetGroups(GroupLocation.AllChildrenGrps); foreach(KeyValuePair<string, NcGroup> g in groups) { g.Value.GetAtts().ToList().ForEach(x => ncAtts[x.Key] = x.Value); } } return ncAtts; }