Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ColumnMapping

virtual MappingType System.Data.DataColumn.ColumnMapping
getset

Definition at line 955 of file DataColumn.cs.

956 {
957 get
958 {
959 return _columnMapping;
960 }
961 set
962 {
963 DataCommonEventSource.Log.Trace("<ds.DataColumn.set_ColumnMapping|API> {0}, {1}", ObjectID, value);
964 if (value == _columnMapping)
965 {
966 return;
967 }
968 if (value == MappingType.SimpleContent && _table != null)
969 {
970 int num = 0;
971 if (_columnMapping == MappingType.Element)
972 {
973 num = 1;
974 }
975 if (_dataType == typeof(char))
976 {
977 throw ExceptionBuilder.CannotSetSimpleContent(ColumnName, _dataType);
978 }
979 if (_table.XmlText != null && _table.XmlText != this)
980 {
981 throw ExceptionBuilder.CannotAddColumn3();
982 }
983 if (_table.ElementColumnCount > num)
984 {
985 throw ExceptionBuilder.CannotAddColumn4(ColumnName);
986 }
987 }
988 RaisePropertyChanging("ColumnMapping");
989 if (_table != null)
990 {
991 if (_columnMapping == MappingType.SimpleContent)
992 {
993 _table._xmlText = null;
994 }
995 if (value == MappingType.Element)
996 {
998 }
999 else if (_columnMapping == MappingType.Element)
1000 {
1002 }
1003 }
1005 if (value == MappingType.SimpleContent)
1006 {
1007 _columnUri = null;
1008 if (_table != null)
1009 {
1010 _table.XmlText = this;
1011 }
1012 SimpleType = null;
1013 }
1014 }
1015 }
void RaisePropertyChanging(string name)
MappingType _columnMapping
Definition DataColumn.cs:54
DataColumn? XmlText
Definition DataTable.cs:855

Referenced by System.Data.DataTableReader.GetSchemaTableFromDataTable(), System.Data.XmlDataLoader.IsTextOnly(), System.Xml.XPathNodePointer.IsValidChild(), System.Xml.DataPointer.MoveToAttribute(), System.Xml.XPathNodePointer.MoveToAttribute(), System.Xml.XPathNodePointer.MoveToNextAttribute(), System.Xml.DataPointer.MoveToOwnerElement(), System.Xml.DataPointer.MoveToParent(), and System.Xml.DataPointer.RealFoliate().