public static void CollectTextBoxes(ReportItem reportItem, PageContext pageContext, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes)
 {
     if (reportItem != null && useForPageHFEval && HeaderFooterEval.ShouldBeCollected(reportItem))
     {
         if (reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.TextBox)
         {
             AspNetCore.ReportingServices.OnDemandReportRendering.TextBox textBox = (AspNetCore.ReportingServices.OnDemandReportRendering.TextBox)reportItem;
             List <object> list = null;
             if (!textBoxes.ContainsKey(textBox.Name))
             {
                 list = new List <object>();
                 textBoxes[textBox.Name] = list;
             }
             else
             {
                 list = textBoxes[textBox.Name];
             }
             list.Add(((TextBoxInstance)textBox.Instance).OriginalValue);
         }
         else if (reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle)
         {
             HeaderFooterEval.CollectTextBoxes(((AspNetCore.ReportingServices.OnDemandReportRendering.Rectangle)reportItem).ReportItemCollection, pageContext, true, textBoxes);
         }
         else if (!(reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.SubReport) && reportItem is AspNetCore.ReportingServices.OnDemandReportRendering.Tablix)
         {
             HeaderFooterEval.CollectTextBoxes((AspNetCore.ReportingServices.OnDemandReportRendering.Tablix)reportItem, pageContext, true, textBoxes);
         }
     }
 }
 private static void CollectTextBoxes(AspNetCore.ReportingServices.OnDemandReportRendering.Tablix tablix, PageContext pageContext, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes)
 {
     if (tablix != null && useForPageHFEval && HeaderFooterEval.ShouldBeCollected(tablix))
     {
         TablixInstance tablixInstance = (TablixInstance)tablix.Instance;
         HeaderFooterEval.CollectTablixMembersContents(tablix, null, -1, TablixState.ColMembers, tablixInstance.NoRows, pageContext, true, textBoxes);
         HeaderFooterEval.CollectTablixMembersContents(tablix, null, 0, TablixState.RowMembers, tablixInstance.NoRows, pageContext, true, textBoxes);
     }
 }
        private static int CollectTablixMembersContents(AspNetCore.ReportingServices.OnDemandReportRendering.Tablix tablix, TablixMember memberParent, int rowMemberIndexCell, TablixState state, bool noRows, PageContext context, bool useForPageHFEval, Dictionary <string, List <object> > textBoxes)
        {
            TablixMemberCollection tablixMemberCollection = null;

            if (memberParent == null)
            {
                switch (state)
                {
                case TablixState.RowMembers:
                    tablixMemberCollection = tablix.RowHierarchy.MemberCollection;
                    break;

                case TablixState.ColMembers:
                    HeaderFooterEval.CollectTablixCornerContents(tablix.Corner, context, useForPageHFEval, textBoxes);
                    goto default;

                default:
                    tablixMemberCollection = tablix.ColumnHierarchy.MemberCollection;
                    break;
                }
            }
            else
            {
                tablixMemberCollection = memberParent.Children;
            }
            if (tablixMemberCollection == null)
            {
                if (state == TablixState.RowMembers)
                {
                    HeaderFooterEval.CollectTablixMembersContents(tablix, null, memberParent.MemberCellIndex, TablixState.DetailRows, noRows, context, useForPageHFEval, textBoxes);
                }
                else
                {
                    HeaderFooterEval.CollectDetailCellContents(tablix, memberParent.MemberCellIndex, rowMemberIndexCell, context, useForPageHFEval, textBoxes);
                }
                if (!useForPageHFEval)
                {
                    return(0);
                }
                return(1);
            }
            bool                        flag                        = true;
            bool                        flag2                       = true;
            TablixMember                tablixMember                = null;
            TablixMemberInstance        tablixMemberInstance        = null;
            TablixDynamicMemberInstance tablixDynamicMemberInstance = null;
            int  num = 0;
            bool useForPageHFEval2 = useForPageHFEval;

            for (int i = 0; i < tablixMemberCollection.Count; i++)
            {
                useForPageHFEval2 = useForPageHFEval;
                tablixMember      = ((ReportElementCollectionBase <TablixMember>)tablixMemberCollection)[i];
                if (!noRows || !tablixMember.HideIfNoRows)
                {
                    flag = true;
                    tablixMemberInstance = tablixMember.Instance;
                    if (tablixMember.IsStatic)
                    {
                        flag2 = HeaderFooterEval.ShouldBeCollected(tablixMember, ref useForPageHFEval2);
                    }
                    else
                    {
                        tablixDynamicMemberInstance = (TablixDynamicMemberInstance)tablixMemberInstance;
                        tablixDynamicMemberInstance.ResetContext();
                        flag = tablixDynamicMemberInstance.MoveNext();
                        if (flag)
                        {
                            flag2 = HeaderFooterEval.ShouldBeCollected(tablixMember, ref useForPageHFEval2);
                        }
                    }
                    while (flag)
                    {
                        if (flag2)
                        {
                            int num2 = HeaderFooterEval.CollectTablixMembersContents(tablix, tablixMember, rowMemberIndexCell, state, noRows, context, useForPageHFEval2, textBoxes);
                            if (state != TablixState.DetailRows && tablixMember.TablixHeader != null && num2 > 0)
                            {
                                HeaderFooterEval.CollectTextBoxes(tablixMember.TablixHeader.CellContents.ReportItem, context, useForPageHFEval2, textBoxes);
                                num++;
                            }
                        }
                        if (tablixMember.IsStatic)
                        {
                            flag = false;
                        }
                        else
                        {
                            flag = tablixDynamicMemberInstance.MoveNext();
                            if (flag)
                            {
                                useForPageHFEval2 = useForPageHFEval;
                                flag2             = HeaderFooterEval.ShouldBeCollected(tablixMember, ref useForPageHFEval2);
                            }
                        }
                    }
                    tablixMemberInstance = null;
                }
            }
            return(num);
        }