Пример #1
0
        public void Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(m_Declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.Name:
                    m_name = reader.ReadString();
                    break;

                case MemberName.Fields:
                    m_fields = reader.ReadGenericListOfRIFObjects <Field>();
                    break;

                case MemberName.Query:
                    m_query = (ReportQuery)reader.ReadRIFObject();
                    break;

                case MemberName.SharedDataSetQuery:
                    m_sharedDataSetQuery = (SharedDataSetQuery)reader.ReadRIFObject();
                    break;

                case MemberName.Collation:
                    m_collation = reader.ReadString();
                    break;

                case MemberName.CollationCulture:
                    m_collationCulture = reader.ReadString();
                    break;

                case MemberName.LCID:
                    m_lcid = reader.ReadUInt32();
                    break;

                case MemberName.CaseSensitivity:
                    m_caseSensitivity = (DataSet.TriState)reader.ReadEnum();
                    break;

                case MemberName.AccentSensitivity:
                    m_accentSensitivity = (DataSet.TriState)reader.ReadEnum();
                    break;

                case MemberName.KanatypeSensitivity:
                    m_kanatypeSensitivity = (DataSet.TriState)reader.ReadEnum();
                    break;

                case MemberName.WidthSensitivity:
                    m_widthSensitivity = (DataSet.TriState)reader.ReadEnum();
                    break;

                case MemberName.Filters:
                    m_filters = reader.ReadGenericListOfRIFObjects <Filter>();
                    break;

                case MemberName.InterpretSubtotalsAsDetails:
                    m_interpretSubtotalsAsDetails = (DataSet.TriState)reader.ReadEnum();
                    break;

                case MemberName.CatalogID:
                    m_catalogID = reader.ReadGuid();
                    break;

                case MemberName.NonCalculatedFieldCount:
                    m_nonCalculatedFieldCount = reader.ReadInt32();
                    break;

                case MemberName.CompiledCode:
                    m_compiledCode = reader.ReadByteArray();
                    break;

                case MemberName.CompiledCodeGeneratedWithRefusedPermissions:
                    m_compiledCodeGeneratedWithRefusedPermissions = reader.ReadBoolean();
                    break;

                case MemberName.ExprHostID:
                    m_exprHostID = reader.ReadInt32();
                    break;

                case MemberName.ExprHostAssemblyID:
                    m_exprHostAssemblyId = reader.ReadGuid();
                    break;

                case MemberName.NullsAsBlanks:
                    m_nullsAsBlanks = reader.ReadBoolean();
                    break;

                default:
                    Global.Tracer.Assert(condition: false, string.Empty);
                    break;
                }
            }
        }
Пример #2
0
        void IPersistable.Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(DataSource.m_Declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.Name:
                    this.m_name = reader.ReadString();
                    break;

                case MemberName.Transaction:
                    this.m_transaction = reader.ReadBoolean();
                    break;

                case MemberName.Type:
                    this.m_type = reader.ReadString();
                    break;

                case MemberName.ConnectString:
                    this.m_connectString = (ExpressionInfo)reader.ReadRIFObject();
                    break;

                case MemberName.IntegratedSecurity:
                    this.m_integratedSecurity = reader.ReadBoolean();
                    break;

                case MemberName.Prompt:
                    this.m_prompt = reader.ReadString();
                    break;

                case MemberName.DataSourceReference:
                    this.m_dataSourceReference = reader.ReadString();
                    break;

                case MemberName.DataSets:
                    this.m_dataSets = reader.ReadGenericListOfRIFObjects <DataSet>();
                    break;

                case MemberName.ID:
                    this.m_ID = reader.ReadGuid();
                    break;

                case MemberName.ExprHostID:
                    this.m_exprHostID = reader.ReadInt32();
                    break;

                case MemberName.SharedDataSourceReferencePath:
                    this.m_sharedDataSourceReferencePath = reader.ReadString();
                    break;

                case MemberName.ReferenceID:
                    this.m_referenceID = reader.ReadInt32();
                    break;

                case MemberName.IsArtificialDataSource:
                    this.m_isArtificialDataSource = reader.ReadBoolean();
                    break;

                default:
                    Global.Tracer.Assert(false, string.Empty);
                    break;
                }
            }
        }