System.Data.XmlSchemaDataImporter.ImportColumnMetaInfo C# (CSharp) Метод

ImportColumnMetaInfo() приватный Метод

private ImportColumnMetaInfo ( XmlSchemaAnnotated obj, XmlQualifiedName name, DataColumn col ) : void
obj System.Xml.Schema.XmlSchemaAnnotated
name System.Xml.XmlQualifiedName
col DataColumn
Результат void
		private void ImportColumnMetaInfo (XmlSchemaAnnotated obj, XmlQualifiedName name, DataColumn col)
		{
			if (obj.UnhandledAttributes != null) {
				foreach (XmlAttribute attr in obj.UnhandledAttributes) {
					if (attr.NamespaceURI == XmlConstants.MspropNamespace) {
					       col.ExtendedProperties.Add (attr.Name, attr.Value);
					       continue;
					}

					if (attr.NamespaceURI != XmlConstants.MsdataNamespace)
						continue;
					switch (attr.LocalName) {
					case XmlConstants.Caption:
						col.Caption = attr.Value;
						break;
					case XmlConstants.DataType:
						col.DataType = Type.GetType (attr.Value);
						break;
					case XmlConstants.AutoIncrement:
						col.AutoIncrement = bool.Parse (attr.Value);
						break;
					case XmlConstants.AutoIncrementSeed:
						col.AutoIncrementSeed = int.Parse (attr.Value);
						break;
					case XmlConstants.AutoIncrementStep:
						col.AutoIncrementStep = int.Parse (attr.Value);
						break;
					case XmlConstants.ReadOnly:
						col.ReadOnly = XmlConvert.ToBoolean (attr.Value);
						break;
					case XmlConstants.Ordinal:
						int ordinal = int.Parse (attr.Value);
						break;
					}
				}
			}
		}