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

◆ CopyFromCompiledSet()

void System.Xml.Schema.XmlSchemaSet.CopyFromCompiledSet ( XmlSchemaSet otherSet)
inlinepackage

Definition at line 930 of file XmlSchemaSet.cs.

931 {
932 SortedList sortedSchemas = otherSet.SortedSchemas;
933 bool flag = _schemas.Count == 0;
935 SchemaInfo schemaInfo = new SchemaInfo();
936 for (int i = 0; i < sortedSchemas.Count; i++)
937 {
938 XmlSchema xmlSchema = (XmlSchema)sortedSchemas.GetByIndex(i);
939 Uri baseUri = xmlSchema.BaseUri;
940 if (_schemas.ContainsKey(xmlSchema.SchemaId) || (baseUri != null && baseUri.OriginalString.Length != 0 && _schemaLocations[baseUri] != null))
941 {
943 continue;
944 }
945 _schemas.Add(xmlSchema.SchemaId, xmlSchema);
946 if (baseUri != null && baseUri.OriginalString.Length != 0)
947 {
949 }
952 {
954 }
955 }
956 VerifyTables();
957 foreach (XmlSchemaElement value in otherSet.GlobalElements.Values)
958 {
959 if (AddToTable(elements, value.QualifiedName, value))
960 {
961 continue;
962 }
963 goto IL_026e;
964 }
965 foreach (XmlSchemaAttribute value2 in otherSet.GlobalAttributes.Values)
966 {
967 if (AddToTable(attributes, value2.QualifiedName, value2))
968 {
969 continue;
970 }
971 goto IL_026e;
972 }
973 foreach (XmlSchemaType value3 in otherSet.GlobalTypes.Values)
974 {
975 if (AddToTable(schemaTypes, value3.QualifiedName, value3))
976 {
977 continue;
978 }
979 goto IL_026e;
980 }
983 schemaInfo.Add(otherSet.CompiledInfo, _eventHandler);
984 _cachedCompiledInfo = schemaInfo;
985 if (flag)
986 {
987 _isCompiled = true;
988 _compileAll = false;
989 }
990 return;
991 IL_026e:
992 foreach (XmlSchema value4 in sortedSchemas.Values)
993 {
995 {
997 }
998 }
999 foreach (XmlSchemaElement value5 in otherSet.GlobalElements.Values)
1000 {
1001 if (!arrayList.Contains((XmlSchema)value5.Parent))
1002 {
1003 elements.Remove(value5.QualifiedName);
1004 }
1005 }
1006 foreach (XmlSchemaAttribute value6 in otherSet.GlobalAttributes.Values)
1007 {
1008 if (!arrayList.Contains((XmlSchema)value6.Parent))
1009 {
1010 attributes.Remove(value6.QualifiedName);
1011 }
1012 }
1013 foreach (XmlSchemaType value7 in otherSet.GlobalTypes.Values)
1014 {
1015 if (!arrayList.Contains((XmlSchema)value7.Parent))
1016 {
1017 schemaTypes.Remove(value7.QualifiedName);
1018 }
1019 }
1020 }
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
virtual void Add(object key, object? value)
Definition Hashtable.cs:676
virtual void Add(object key, object? value)
virtual bool ContainsKey(object key)
string GetTargetNamespace(XmlSchema schema)
readonly Hashtable _targetNamespaces
bool AddToTable(XmlSchemaObjectTable table, XmlQualifiedName qname, XmlSchemaObject item)
XmlSchemaObjectTable elements
XmlSchemaObjectTable attributes
void ProcessNewSubstitutionGroups(XmlSchemaObjectTable substitutionGroupsTable, bool resolve)
readonly Hashtable _schemaLocations
readonly SortedList _schemas
XmlSchemaObjectTable schemaTypes
ValidationEventHandler _eventHandler

References System.Xml.Schema.XmlSchemaSet._cachedCompiledInfo, System.Xml.Schema.XmlSchemaSet._compileAll, System.Xml.Schema.XmlSchemaSet._eventHandler, System.Xml.Schema.XmlSchemaSet._isCompiled, System.Xml.Schema.XmlSchemaSet._schemaLocations, System.Xml.Schema.XmlSchemaSet._schemas, System.Xml.Schema.XmlSchemaSet._targetNamespaces, System.Collections.SortedList.Add(), System.Collections.Hashtable.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Schema.XmlSchemaSet.AddToTable(), System.Xml.Schema.XmlSchemaSet.attributes, System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), System.Collections.SortedList.ContainsKey(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.Xml.Schema.XmlSchemaSet.elements, System.Xml.Schema.XmlSchemaSet.GetTargetNamespace(), System.Uri.OriginalString, System.Xml.Schema.XmlSchemaSet.ProcessNewSubstitutionGroups(), System.Xml.Schema.XmlSchemaObjectTable.Remove(), System.Xml.Remove, System.Xml.Schema.XmlSchemaSet.schemaTypes, System.value, System.Collections.Generic.Dictionary< TKey, TValue >.Values, and System.Xml.Schema.XmlSchemaSet.VerifyTables().

Referenced by System.Xml.Schema.XmlSchemaSet.Add().