Exemple #1
0
        internal ImmutableModelList <ImmutableObject> MChildren(ObjectId oid)
        {
            GreenObject green;

            if (this.green.Objects.TryGetValue(oid, out green))
            {
                return(ImmutableModelList <ImmutableObject> .FromObjectIdList(green.Children, this));
            }
            return(ImmutableModelList <ImmutableObject> .Empty);
        }
        internal ImmutableModelList <MutableObject> MChildren(ObjectId oid)
        {
            ImmutableList <ObjectId> children = ImmutableList <ObjectId> .Empty;
            GreenModelUpdateContext  ctx      = null;

            try
            {
                do
                {
                    ctx      = this.BeginUpdate();
                    children = ctx.Updater.GetChildren(this.id, oid);
                } while (!this.EndUpdate(ctx));
            }
            finally
            {
                this.FinalizeUpdate(ctx);
            }
            return(ImmutableModelList <MutableObject> .FromObjectIdList(children, this));
        }