// ReSharper restore VirtualMemberNeverOverriden.Global
        // ReSharper restore MemberCanBePrivate.Global

        #endregion ReSharper restore

        #endregion Protected

        #region Public

        #region ReSharper disable

        // ReSharper disable MemberCanBePrivate.Global
        // ReSharper disable MemberCanBeProtected.Global
        // ReSharper disable UnusedMember.Global
        // ReSharper disable UnusedMethodReturnValue.Global
        // ReSharper disable UnusedAutoPropertyAccessor.Global
        // ReSharper disable UnassignedField.Global

        #endregion ReSharper disable

        public static Control GetReport(string stateOrFederalCode, string countyCode = "",
                                        string localCode = "")
        {
            var reportObject = new OfficialsReportResponsive();

            return(reportObject.GenerateReport(stateOrFederalCode, countyCode,
                                               localCode));
        }
            public void Generate(OfficialsReportResponsive officialsReport,
                                 bool isForAllStatesReport = false,
                                 string stateCode          = "", string countyCode = "", string localCode = "",
                                 Control reportContainer   = null)
            {
                if (reportContainer == null)
                {
                    reportContainer = officialsReport.ReportContainer;
                }
                OfficialsReport      = officialsReport;
                StateCode            = stateCode;
                CountyCode           = countyCode;
                _LocalCode           = localCode;
                IsForAllStatesReport = isForAllStatesReport;

                if (!string.IsNullOrWhiteSpace(_LocalCode))
                {
                    LocalName =
                        VotePage.GetPageCache()
                        .LocalDistricts.GetLocalDistrict(StateCode, CountyCode, _LocalCode);
                }

                var offices = GetOffices();

                if (offices.Count <= 0)
                {
                    return;
                }

                // ReSharper disable once PossibleNullReferenceException
                (new HtmlDiv().AddTo(reportContainer, "category-title accordion-header")
                 as HtmlGenericControl).InnerHtml = GetCategoryTitle();
                var container = new HtmlDiv().AddTo(reportContainer,
                                                    "category-content accordion-content");

                var entries = 0;

                foreach (var office in offices)
                {
                    var politicians = office.ToList();
                    var officeInfo  = politicians[0];
                    entries += OfficialsReport.ReportOneOffice(container, GetOfficeTitle(officeInfo),
                                                               GetRunningMateTitle(), politicians);
                }
                container.AddCssClasses("candidates-" + entries);
            }