System.Data.XmlSchemaDataImporter.HandleRelationshipAnnotation C# (CSharp) Method

HandleRelationshipAnnotation() private method

private HandleRelationshipAnnotation ( XmlElement el, bool nested ) : void
el System.Xml.XmlElement
nested bool
return void
		private void HandleRelationshipAnnotation (XmlElement el, bool nested)
		{
			string name = el.GetAttribute ("name");
			string ptn = el.GetAttribute ("parent", XmlConstants.MsdataNamespace);
			string ctn = el.GetAttribute ("child", XmlConstants.MsdataNamespace);
			string pkn = el.GetAttribute ("parentkey", XmlConstants.MsdataNamespace);
			string fkn = el.GetAttribute ("childkey", XmlConstants.MsdataNamespace);

			RelationStructure rel = new RelationStructure ();
			rel.ExplicitName = XmlHelper.Decode (name);
			rel.ParentTableName = XmlHelper.Decode (ptn);
			rel.ChildTableName = XmlHelper.Decode (ctn);
			// ColumnNames will be decoded wherever they are used as they can
			// contain 'space' separated list of column-names.
			rel.ParentColumnName = pkn;
			rel.ChildColumnName = fkn;
			rel.IsNested = nested;
			rel.CreateConstraint = false; // by default?
			relations.Add (rel);
		}