Esempio n. 1
0
		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();
		}
Esempio n. 2
0
		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);
		}