private CommonSubReportInfo GetOrCreateCommonSubReportInfo(string reportPath, out bool created)
        {
            created = false;
            if (this.m_commonSubReportInfoMap == null)
            {
                this.m_commonSubReportInfoMap = new Dictionary <string, CommonSubReportInfo>(EqualityComparers.StringComparerInstance);
            }
            CommonSubReportInfo commonSubReportInfo = default(CommonSubReportInfo);

            if (!this.m_commonSubReportInfoMap.TryGetValue(reportPath, out commonSubReportInfo))
            {
                created                        = true;
                commonSubReportInfo            = new CommonSubReportInfo();
                commonSubReportInfo.ReportPath = reportPath;
                this.m_commonSubReportInfoMap.Add(reportPath, commonSubReportInfo);
            }
            return(commonSubReportInfo);
        }
        public bool TryGetSubReportInfo(bool isTopLevelSubreport, string definitionPath, string reportPath, out SubReportInfo subReportInfo)
        {
            subReportInfo = null;
            if (this.m_subReportInfoMap != null && this.m_subReportInfoMap.TryGetValue(definitionPath, out subReportInfo))
            {
                if (subReportInfo.CommonSubReportInfo == null)
                {
                    string key = isTopLevelSubreport ? reportPath : (definitionPath + "_" + reportPath);
                    if (this.m_commonSubReportInfoMap != null)
                    {
                        CommonSubReportInfo commonSubReportInfo = default(CommonSubReportInfo);
                        if (this.m_commonSubReportInfoMap.TryGetValue(key, out commonSubReportInfo))
                        {
                            subReportInfo.CommonSubReportInfo = commonSubReportInfo;
                            return(true);
                        }
                        int length = reportPath.Length;
                        foreach (string key2 in this.m_commonSubReportInfoMap.Keys)
                        {
                            if (key2.Length >= length)
                            {
                                int num = key2.LastIndexOf(reportPath, StringComparison.OrdinalIgnoreCase);
                                if (num >= 0 && num + length == key2.Length)
                                {
                                    subReportInfo.CommonSubReportInfo = this.m_commonSubReportInfoMap[key2];
                                    return(true);
                                }
                            }
                        }
                        goto IL_00e7;
                    }
                    subReportInfo = null;
                    return(false);
                }
                goto IL_00e7;
            }
            return(false);

IL_00e7:
            return(true);
        }
        public bool TryCreateObject(ObjectType objectType, out IPersistable persistObj)
        {
            switch (objectType)
            {
            case ObjectType.DataCellInstance:
                persistObj = new DataCellInstance();
                break;

            case ObjectType.DataAggregateObjResult:
                persistObj = new DataAggregateObjResult();
                break;

            case ObjectType.DataRegionMemberInstance:
                persistObj = new DataRegionMemberInstance();
                break;

            case ObjectType.DataRegionInstance:
                persistObj = new DataRegionInstance();
                break;

            case ObjectType.DataSetInstance:
                persistObj = new DataSetInstance();
                break;

            case ObjectType.ReportInstance:
                persistObj = new ReportInstance();
                break;

            case ObjectType.OnDemandMetadata:
                persistObj = new OnDemandMetadata();
                break;

            case ObjectType.GroupTreePartition:
                persistObj = new GroupTreePartition();
                break;

            case ObjectType.IntermediateFormatVersion:
                persistObj = new IntermediateFormatVersion();
                break;

            case ObjectType.ReportSnapshot:
                persistObj = new ReportSnapshot();
                break;

            case ObjectType.SubReportInstance:
                persistObj = new SubReportInstance();
                break;

            case ObjectType.Parameters:
                persistObj = new ParametersImplWrapper();
                break;

            case ObjectType.Parameter:
                persistObj = new ParameterImplWrapper();
                break;

            case ObjectType.SubReportInfo:
                persistObj = new SubReportInfo();
                break;

            case ObjectType.CommonSubReportInfo:
                persistObj = new CommonSubReportInfo();
                break;

            case ObjectType.ParameterInfo:
                persistObj = new ParameterInfo();
                break;

            case ObjectType.ParameterInfoCollection:
                persistObj = new ParameterInfoCollection();
                break;

            case ObjectType.ParametersLayout:
                persistObj = new ParametersGridLayout();
                break;

            case ObjectType.ParameterGridLayoutCellDefinition:
                persistObj = new ParameterGridLayoutCellDefinition();
                break;

            case ObjectType.ValidValue:
                persistObj = new ValidValue();
                break;

            case ObjectType.FieldInfo:
                persistObj = new FieldInfo();
                break;

            case ObjectType.ImageInfo:
                persistObj = new ImageInfo();
                break;

            case ObjectType.TreePartitionManager:
                persistObj = new TreePartitionManager();
                break;

            case ObjectType.LookupObjResult:
                persistObj = new LookupObjResult();
                break;

            case ObjectType.ShapefileInfo:
                persistObj = new ShapefileInfo();
                break;

            case ObjectType.UpdatedVariableValues:
                persistObj = new UpdatedVariableValues();
                break;

            case ObjectType.DataCellInstanceList:
                persistObj = new DataCellInstanceList();
                break;

            default:
                persistObj = null;
                return(false);
            }
            return(true);
        }