public void CreateAllDataRegionInstances(ScopeInstance parentInstance, OnDemandProcessingContext odpContext, IReference <IScope> owner)
 {
     for (int i = 0; i < this.m_dataRegionObjs.Count; i++)
     {
         RuntimeRICollection.CreateDataRegionInstance(parentInstance, odpContext, this.m_dataRegionObjs[i]);
     }
     this.m_dataRegionObjs = null;
 }
        private void CreateInstance(ScopeInstance parentInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem reportItem, OnDemandProcessingContext odpContext, IReference <IScope> owner)
        {
            if (reportItem != null)
            {
                if (reportItem.IsDataRegion)
                {
                    AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem;
                    RuntimeDataRegionObjReference dataRegionObjRef = this.m_dataRegionObjs[dataRegion.IndexInCollection];
                    RuntimeRICollection.CreateDataRegionInstance(parentInstance, odpContext, dataRegionObjRef);
                }
                else
                {
                    switch (reportItem.ObjectType)
                    {
                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Subreport:
                        this.CreateSubReportInstance((AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport)reportItem, parentInstance, odpContext, owner);
                        break;

                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Rectangle:
                    {
                        AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle rectangle = (AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle)reportItem;
                        this.CreateInstances(parentInstance, odpContext, owner, rectangle.ReportItems.ComputedReportItems);
                        break;
                    }

                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Map:
                    {
                        Map map = (Map)reportItem;
                        List <MapDataRegion> mapDataRegions = map.MapDataRegions;
                        for (int i = 0; i < mapDataRegions.Count; i++)
                        {
                            this.CreateInstance(parentInstance, mapDataRegions[i], odpContext, owner);
                        }
                        break;
                    }
                    }
                }
            }
        }