protected override void ReadXmlSerializable(XmlReader reader) { this.Reset(); DataSet dataSet = new DataSet(); dataSet.ReadXml(reader); if (dataSet.get_Tables().get_Item("Frame") != null) { base.get_Tables().Add(new MulticanDataset.FrameDataTable(dataSet.get_Tables().get_Item("Frame"))); } base.set_DataSetName(dataSet.get_DataSetName()); base.set_Prefix(dataSet.get_Prefix()); base.set_Namespace(dataSet.get_Namespace()); base.set_Locale(dataSet.get_Locale()); base.set_CaseSensitive(dataSet.get_CaseSensitive()); base.set_EnforceConstraints(dataSet.get_EnforceConstraints()); base.Merge(dataSet, false, 1); this.InitVars(); }
protected StreetsHousesFlatsDS(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context, false) { this._schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; if (base.IsBinarySerialized(info, context)) { this.InitVars(false); CollectionChangeEventHandler handler = new CollectionChangeEventHandler(this.SchemaChanged); this.Tables.add_CollectionChanged(handler); this.Relations.add_CollectionChanged(handler); } else { string str = (string) ((string) info.GetValue("XmlSchema", typeof(string))); if (base.DetermineSchemaSerializationMode(info, context) == System.Data.SchemaSerializationMode.IncludeSchema) { System.Data.DataSet set = new System.Data.DataSet(); set.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(str))); if (set.Tables.get_Item("Streets") != null) { base.Tables.Add(new StreetsDataTable(set.Tables.get_Item("Streets"))); } if (set.Tables.get_Item("Houses") != null) { base.Tables.Add(new HousesDataTable(set.Tables.get_Item("Houses"))); } if (set.Tables.get_Item("Flats") != null) { base.Tables.Add(new FlatsDataTable(set.Tables.get_Item("Flats"))); } base.set_DataSetName(set.get_DataSetName()); base.set_Prefix(set.get_Prefix()); base.set_Namespace(set.get_Namespace()); base.set_Locale(set.Locale); base.set_CaseSensitive(set.get_CaseSensitive()); base.set_EnforceConstraints(set.get_EnforceConstraints()); base.Merge(set, false, System.Data.MissingSchemaAction.Add); this.InitVars(); } else { base.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(str))); } base.GetSerializationData(info, context); CollectionChangeEventHandler handler2 = new CollectionChangeEventHandler(this.SchemaChanged); base.Tables.add_CollectionChanged(handler2); this.Relations.add_CollectionChanged(handler2); } }
protected MulticanDataset(SerializationInfo info, StreamingContext context) { string text = (string)info.GetValue("XmlSchema", typeof(string)); if (text != null) { DataSet dataSet = new DataSet(); dataSet.ReadXmlSchema(new XmlTextReader(new StringReader(text))); if (dataSet.get_Tables().get_Item("Frame") != null) { base.get_Tables().Add(new MulticanDataset.FrameDataTable(dataSet.get_Tables().get_Item("Frame"))); } base.set_DataSetName(dataSet.get_DataSetName()); base.set_Prefix(dataSet.get_Prefix()); base.set_Namespace(dataSet.get_Namespace()); base.set_Locale(dataSet.get_Locale()); base.set_CaseSensitive(dataSet.get_CaseSensitive()); base.set_EnforceConstraints(dataSet.get_EnforceConstraints()); base.Merge(dataSet, false, 1); this.InitVars(); } else { this.InitClass(); } base.GetSerializationData(info, context); CollectionChangeEventHandler collectionChangeEventHandler = new CollectionChangeEventHandler(this.SchemaChanged); base.get_Tables().add_CollectionChanged(collectionChangeEventHandler); base.get_Relations().add_CollectionChanged(collectionChangeEventHandler); }
protected override void ReadXmlSerializable(XmlReader reader) { if (base.DetermineSchemaSerializationMode(reader) == System.Data.SchemaSerializationMode.IncludeSchema) { this.Reset(); System.Data.DataSet set = new System.Data.DataSet(); set.ReadXml(reader); if (set.Tables.get_Item("Streets") != null) { base.Tables.Add(new StreetsDataTable(set.Tables.get_Item("Streets"))); } if (set.Tables.get_Item("Houses") != null) { base.Tables.Add(new HousesDataTable(set.Tables.get_Item("Houses"))); } if (set.Tables.get_Item("Flats") != null) { base.Tables.Add(new FlatsDataTable(set.Tables.get_Item("Flats"))); } base.set_DataSetName(set.get_DataSetName()); base.set_Prefix(set.get_Prefix()); base.set_Namespace(set.get_Namespace()); base.set_Locale(set.Locale); base.set_CaseSensitive(set.get_CaseSensitive()); base.set_EnforceConstraints(set.get_EnforceConstraints()); base.Merge(set, false, System.Data.MissingSchemaAction.Add); this.InitVars(); } else { base.ReadXml(reader); this.InitVars(); } }