コード例 #1
0
        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));
        }
コード例 #2
0
        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);
        }