Пример #1
0
        protected AggtBlocks ReadCode(EntityMeta em, Block mainBlock, ReadCodeTemplateOptions op = null)
        {
            op = op ?? new ReadCodeTemplateOptions
            {
                ReadChildren    = true,
                ReadQueryPanels = true
            };

            AggtBlocks result = mainBlock;

            if (op.ReadChildren)
            {
                foreach (var property in em.ChildrenProperties)
                {
                    var childBlock = new ChildBlock(property.ManagedProperty as IListProperty);
                    var childAggt  = this.ReadCode(property.ChildType, childBlock);

                    result.Children.Add(childAggt);
                }
            }

            if (op.ReadQueryPanels)
            {
                this.ReadQueryPanels(em, result);
            }

            return(result);
        }
Пример #2
0
        protected AggtBlocks ReadCode(EntityMeta em, Block mainBlock, ReadCodeTemplateOptions op = null)
        {
            op = op ?? new ReadCodeTemplateOptions
            {
                ReadChildren = true,
                ReadQueryPanels = true
            };

            AggtBlocks result = mainBlock;

            if (op.ReadChildren)
            {
                foreach (var property in em.ChildrenProperties)
                {
                    var childBlock = new ChildBlock(property.ManagedProperty as IListProperty);
                    var childAggt = this.ReadCode(property.ChildType, childBlock);

                    result.Children.Add(childAggt);
                }
            }

            if (op.ReadQueryPanels) { this.ReadQueryPanels(em, result); }

            return result;
        }