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

ImportColumnElement() private method

private ImportColumnElement ( XmlSchemaElement parent, XmlSchemaElement el ) : void
parent System.Xml.Schema.XmlSchemaElement
el System.Xml.Schema.XmlSchemaElement
return void
		private void ImportColumnElement (XmlSchemaElement parent, XmlSchemaElement el)
		{
			// FIXME: element nest check

			DataColumn col = new DataColumn ();
			col.DefaultValue = GetElementDefaultValue (el);
			col.AllowDBNull = (el.MinOccurs == 0);

#if NET_2_0
			if (el.ElementSchemaType is XmlSchemaComplexType && el.ElementSchemaType != schemaAnyType)
#else
			if (el.ElementType is XmlSchemaComplexType && el.ElementType != schemaAnyType)
#endif
				FillDataColumnComplexElement (parent, el, col);
			else if (el.MaxOccurs != 1)
				FillDataColumnRepeatedSimpleElement (parent, el, col);
			else
				FillDataColumnSimpleElement (el, col);
		}