internal ImmutableModelList <ImmutableObject> MGetMembers(ObjectId oid) { GreenList result = GreenList.EmptyUnique; foreach (var prop in this.MProperties(oid)) { if (prop.CanResolve) { if (prop.IsCollection) { var items = this.GetGreenValue(oid, prop) as GreenList; if (items != null) { result = result.AddRange(items); } } else { var item = this.GetGreenValue(oid, prop); result = result.Add(item); } } } return(ImmutableModelList <ImmutableObject> .FromGreenList(result, this, oid)); }
private GreenList CollectBases(ObjectId oid) { GreenList result = GreenList.EmptyUnique; foreach (var prop in this.MProperties(oid)) { if (prop.IsBaseScope) { if (prop.IsCollection) { var items = this.GetGreenValue(oid, prop) as GreenList; if (items != null) { result = result.AddRange(items); } } else { var item = this.GetGreenValue(oid, prop); result = result.Add(item); } } } return(result); }
private void CollectAllBases(ObjectId oid, ref GreenList result) { if (oid == null) { return; } var oldResult = result; result = result.Add(oid); if (result == oldResult) { return; } var bases = this.CollectBases(oid); foreach (var item in bases) { this.CollectAllBases(item as ObjectId, ref result); } }