16 public readonly
string name;
192 if (
text2.Length != 0)
209 if (!name.Contains(
':'))
223 for (
int i = 0; i <
attrs.Length; i++)
225 if (!(
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msdata"))
229 string localName =
attrs[i].LocalName;
242 case "RemotingFormat":
245 if (localName ==
"DataType")
289 for (
int i = 0; i <
attrs.Length; i++)
291 if (!(
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msprop"))
327 for (
int i = 0; i <
attrs.Length; i++)
329 if (
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msdata" &&
attrs[i].LocalName ==
"Expression")
364 if (
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msprop")
399 string attribute =
node.GetAttribute(
"parent",
"urn:schemas-microsoft-com:xml-msdata");
405 string attribute2 =
node.GetAttribute(
"child",
"urn:schemas-microsoft-com:xml-msdata");
411 string attribute3 =
node.GetAttribute(
"parentkey",
"urn:schemas-microsoft-com:xml-msdata");
417 attribute3 =
node.GetAttribute(
"childkey",
"urn:schemas-microsoft-com:xml-msdata");
423 int num =
array.Length;
430 string attribute4 =
node.GetAttribute(
"ParentTableNamespace",
"urn:schemas-microsoft-com:xml-msdata");
431 string attribute5 =
node.GetAttribute(
"ChildTableNamespace",
"urn:schemas-microsoft-com:xml-msdata");
442 for (
int j = 0;
j < num;
j++)
593 if (
dt.DataSet !=
null)
628 if (
ds._namespaceURI ==
null ||
ds._namespaceURI.Length == 0)
654 if (
column.SimpleType !=
null &&
column.SimpleType.Name !=
null &&
column.SimpleType.Name.Length != 0)
682 if (
ds !=
null &&
ds._useDataSetSchemaOnly)
739 if (
table2.NestedParentRelations.Length != 0 || !(
table2.Namespace ==
ds.Namespace))
789 for (
int i = 0; i <
markup.Length; i++)
952 if (
ct.ContentModel !=
null)
1032 if (
ct.Particle !=
null)
1050 if (
ct.ContentModel !=
null)
1070 if (
field.StartsWith(
'@'))
1146 "Cascade" =>
Rule.Cascade,
1147 "None" =>
Rule.None,
1148 "SetDefault" =>
Rule.SetDefault,
1149 "SetNull" =>
Rule.SetNull,
1167 if (
text ==
null ||
text.Length == 0)
1181 int num =
array2[0].Table.Constraints.InternalIndexOf(
defVal);
1182 if (num > -1 &&
array2[0].Table.Constraints[num].ConstraintName !=
defVal)
1252 if (
text ==
null ||
text.Length == 0)
1271 if (
array.Length == 0)
1292 for (
int i = 0; i <
array.Length; i++)
1294 array[i].AllowDBNull =
false;
1305 if (!FromInference &&
dataTable !=
null)
1321 string prefix = GetPrefix(@
namespace);
1360 if (_dsElement !=
null && _dsElement.
Constraints !=
null)
1366 HandleConstraint(constraint);
1376 string result =
null;
1397 if (!FromInference || (FromInference &&
dataTable ==
null))
1450 string prefix = GetPrefix(@
namespace);
1465 dataTable.Columns[i].SetOrdinalInternal(i);
1469 if (_dsElement !=
null && _dsElement.
Constraints !=
null)
1473 if (!(constraint
is XmlSchemaKeyref) && GetTableName(constraint) ==
dataTable.TableName && (GetTableNamespace(constraint) ==
dataTable.Namespace || GetTableNamespace(constraint) ==
null))
1475 HandleConstraint(constraint);
1485 if (_dsElement !=
null && _dsElement.
Constraints !=
null)
1493 if (
item.DataSet.Tables.InternalIndexOf(
item.TableName) < -1)
1522 int num =
dataTable.UKColumnPositionForInference;
1618 if (
text2 ==
"http://www.w3.org/2001/XMLSchema")
1622 if (
text ==
null ||
text.Length == 0)
1625 if (
text ==
null ||
text.Length == 0)
1643 if (
typeNode.QualifiedName.Name !=
null &&
typeNode.QualifiedName.Name.Length != 0 &&
typeNode.QualifiedName.Namespace !=
"http://www.w3.org/2001/XMLSchema")
1694 string text3 =
null;
1698 for (
int i = 0; i <
attrs.Length; i++)
1700 if (
attrs[i].LocalName ==
"AllowDBNull" &&
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msdata" &&
attrs[i].Value ==
"false")
1704 if (
attrs[i].LocalName ==
"Ordinal" &&
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msdata")
1708 if (
attrs[i].LocalName ==
"DefaultValue" &&
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msdata")
1803 string text3 =
null;
1807 for (
int i = 0; i <
attrs.Length; i++)
1809 if (
attrs[i].LocalName ==
"AllowDBNull" &&
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msdata" &&
attrs[i].Value ==
"false")
1813 if (
attrs[i].LocalName ==
"Ordinal" &&
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msdata")
1817 if (
attrs[i].LocalName ==
"DefaultValue" &&
attrs[i].NamespaceURI ==
"urn:schemas-microsoft-com:xml-msdata")
1874 if (!
string.IsNullOrEmpty(
text))
1880 text =
string.Empty;
2022 if (
string.IsNullOrEmpty(
text))
2024 text =
string.Empty;
2104 if (!
string.IsNullOrEmpty(
dataColumn.Expression))
2133 while (parent.
Parent !=
null)
2201 else if (GetBooleanAttribute(
node,
"UseCurrentLocale",
defVal:
false))
2219 SetProperties(_ds,
node.UnhandledAttributes);
2220 SetExtProperties(_ds,
node.UnhandledAttributes);
2221 if (
text !=
null &&
text.Length != 0)
2310 if (
node.Constraints !=
null)
2354 for (
int i = 0; i <
array.Length; i++)
2358 return array[i].Name;
2374 for (
int i = 0; i <
array.Length; i++)
2378 return array[i].Namespace;
2389 string empty =
string.Empty;
2391 if (
text ==
null ||
text.Length == 0)
2395 if (
text.Contains(
':'))
2399 return GetNamespaceFromPrefix(
empty);
2401 return GetMsdataAttribute(
key,
"TableNamespace");
2407 string text =
xPath.Split(
'/',
':')[^1];
2408 if (
text ==
null ||
text.Length == 0)
2417 if (
node.MaxOccurs == 0
m)
2432 object obj = FindTypeNode(
node);
2433 if (
node.MaxOccurs > 1
m &&
obj ==
null)
2456 object obj = FindTypeNode(
node);
2457 if (
node.MaxOccurs > 1
m &&
obj ==
null)
2459 return InstantiateSimpleTable(
node);
static int BinarySearch(Array array, object? value)
virtual void Remove(object? obj)
virtual int Add(object? value)
virtual bool Contains(object? item)
bool ContainsKey(TKey key)
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
Enumerator GetEnumerator()
void Add(TKey key, TValue value)
virtual bool ContainsKey(object key)
virtual void Add(object key, object? value)
static PropertyDescriptorCollection GetProperties([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType)
static ? object ChangeType(object? value, TypeCode typeCode)
static Type GetType(string value)
bool Contains(string name)
void AddAt(int index, DataColumn column)
void Add(DataColumn column)
void Add(DataRelation relation)
DataRelationCollection Relations
DataTableCollection Tables
void SetLocaleValue(CultureInfo value, bool userSet)
DataTable GetTableSmart(string name, string ns)
void ReplaceFromInference(List< DataTable > tableList)
DataTable GetTable(string name, string ns)
void Add(DataTable table)
DataColumnCollection Columns
int UKColumnPositionForInference
DataRelationCollection ChildRelations
static Exception DuplicateConstraintRead(string str)
static Exception MissingAttribute(string attribute)
static Exception RelationParentNameMissing(string rel)
static Exception TooManyIsDataSetAttributesInSchema()
static Exception CannotInstantiateAbstract(string name)
static Exception ColumnTypeConflict(string name)
static Exception UndefinedDatatype(string name)
static Exception InvalidAttributeValue(string name, string value)
static Exception ElementTypeNotFound(string name)
static Exception IsDataSetAttributeMissingInSchema()
static Exception RelationChildKeyMissing(string rel)
static Exception DuplicateDeclaration(string name)
static Exception DatatypeNotDefined()
static Exception RelationChildNameMissing(string rel)
static Exception InvalidSelector(string name)
static Exception CannotConvert(string name, string type)
static Exception InvalidField(string name)
static Exception InvalidKey(string name)
static Exception InvalidDuplicateNamedSimpleTypeDelaration(string stName, string errorStr)
static Exception MissingRefer(string name)
static Exception MismatchKeyLength()
static Exception RelationTableKeyMissing(string rel)
static Exception CircularComplexType(string name)
static bool FEqualIdentity(XmlNode node, string name, string ns)
static TypeConverter GetConverter(Type type)
NameType(string n, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields|DynamicallyAccessedMemberTypes.PublicProperties)] Type t)
int CompareTo(object obj)
string GetInstanceName(XmlSchemaAnnotated node)
Hashtable _constraintNodes
int DatasetElementCount(XmlSchemaObjectCollection elements)
void HandleRelation(XmlElement node, bool fNested)
bool HasAttributes(XmlSchemaObjectCollection attributes)
void CollectElementsAnnotations(XmlSchema schema)
string GetStringAttribute(XmlSchemaAnnotated element, string attrName, string defVal)
void CollectElementsAnnotations(XmlSchema schema, ArrayList schemaList)
void HandleSimpleTypeSimpleContentColumn(XmlSchemaSimpleType typeNode, string strType, DataTable table, bool isBase, XmlAttribute[] attrs, bool isNillable)
DataColumn[] BuildKey(XmlSchemaIdentityConstraint keyNode, DataTable table)
bool IsTable(XmlSchemaElement node)
void HandleSimpleContentColumn(string strType, DataTable table, bool isBase, XmlAttribute[] attrs, bool isNillable)
Dictionary< DataTable, List< DataTable > > _tableDictionary
void HandleElementColumn(XmlSchemaElement elem, DataTable table, bool isBase)
string GetTableNamespace(XmlSchemaIdentityConstraint key)
DataColumn FindField(DataTable table, string field)
XmlSchemaObjectCollection _elements
string GetNamespaceFromPrefix(string prefix)
void HandleColumnExpression(object instance, XmlAttribute[] attrs)
void HandleAttributes(XmlSchemaObjectCollection attributes, DataTable table, bool isBase)
XmlSchemaParticle GetParticle(XmlSchemaComplexType ct)
void HandleAttributeGroup(XmlSchemaAttributeGroup attributeGroup, DataTable table, bool isBase)
static void SetExtProperties(object instance, XmlAttribute[] attrs)
XmlSchemaElement _dsElement
ArrayList _columnExpressions
Type ParseDataType(string dt)
void LoadSchema(XmlSchemaSet schemaSet, DataTable dt)
void LoadSchema(XmlSchemaSet schemaSet, DataSet ds)
static void SetExtProperties(object instance, XmlAttributeCollection attrs)
static string GetMsdataAttribute(XmlSchemaAnnotated node, string ln)
static AcceptRejectRule TranslateAcceptRejectRule(string strRule)
static bool IsXsdType(string name)
XmlSchemaObjectCollection _annotations
void HandleComplexType(XmlSchemaComplexType ct, DataTable table, ArrayList tableChildren, bool isNillable)
XmlSchemaElement FindDatasetElement(XmlSchemaObjectCollection elements)
void HandleRefTableProperties(ArrayList RefTables, XmlSchemaElement element)
static Type XsdtoClr(string xsdTypeName)
DataTable HandleTable(XmlSchemaElement node)
void HandleAttributeColumn(XmlSchemaAttribute attrib, DataTable table, bool isBase)
string GetTableName(XmlSchemaIdentityConstraint key)
string GetPrefix(string ns)
void HandleConstraint(XmlSchemaIdentityConstraint keyNode)
void HandleKeyref(XmlSchemaKeyref keyref)
Hashtable _attributeGroups
void AddTablesToList(List< DataTable > tableList, DataTable dt)
void HandleDataSet(XmlSchemaElement node, bool isNewDataSet)
XmlSchemaObjectCollection GetParticleItems(XmlSchemaParticle pt)
static readonly NameType[] s_mapNameTypeXsd
static void SetProperties(object instance, XmlAttribute[] attrs)
bool GetBooleanAttribute(XmlSchemaAnnotated element, string attrName, bool defVal)
void HandleParticle(XmlSchemaParticle pt, DataTable table, ArrayList tableChildren, bool isBase)
DataTable InstantiateSimpleTable(XmlSchemaElement node)
static NameType FindNameType(string name)
XmlSchemaAnnotated FindTypeNode(XmlSchemaAnnotated node)
static Rule TranslateRule(string strRule)
Hashtable _existingSimpleTypeMap
static string QualifiedName(string name)
DataTable InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, bool isRef)
bool IsDatasetParticle(XmlSchemaParticle pt)
void HandleRelations(XmlSchemaAnnotation ann, bool fNested)
static CultureInfo CurrentCulture
static CultureInfo InvariantCulture
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
XmlAttribute?[] UnhandledAttributes
XmlSchemaObjectCollection Constraints
XmlQualifiedName QualifiedName
int Add(XmlSchemaObject item)
static ? string DecodeName(string? name)
DynamicallyAccessedMemberTypes