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

ContainsColumn() private method

private ContainsColumn ( XmlSchemaParticle p ) : bool
p System.Xml.Schema.XmlSchemaParticle
return bool
		private bool ContainsColumn (XmlSchemaParticle p)
		{
			XmlSchemaElement el = p as XmlSchemaElement;
			if (el != null) {
				XmlSchemaComplexType ct = null;
#if NET_2_0
				ct = el.ElementSchemaType as XmlSchemaComplexType;
#else
				ct = el.ElementType as XmlSchemaComplexType;
#endif
				if (ct == null || ct == schemaAnyType)
					return true; // column element
				if (ct.AttributeUses.Count > 0)
					return false; // table element
				if (ct.ContentType == XmlSchemaContentType.TextOnly)
					return true; // column element
				else
					return false; // table element
			}
			XmlSchemaGroupBase gb = p as XmlSchemaGroupBase;
			for (int i = 0; i < gb.Items.Count; i++) {
				if (ContainsColumn ((XmlSchemaParticle) gb.Items [i]))
					return true;
			}
			return false;
		}