Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SchemaExporter.cs
Go to the documentation of this file.
5using System.IO;
7using System.Xml;
10
12
13internal sealed class SchemaExporter
14{
15 private readonly XmlSchemaSet _schemas;
16
18
20
22
24
26
28
30
32
34
36
38
40
42 {
43 get
44 {
45 if (_xmlDoc == null)
46 {
47 _xmlDoc = new XmlDocument();
48 }
49 return _xmlDoc;
50 }
51 }
52
62
75
77 {
78 get
79 {
80 if (s_anytypeQualifiedName == null)
81 {
82 s_anytypeQualifiedName = new XmlQualifiedName("anyType", "http://www.w3.org/2001/XMLSchema");
83 }
85 }
86 }
87
89 {
90 get
91 {
92 if (s_stringQualifiedName == null)
93 {
94 s_stringQualifiedName = new XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema");
95 }
97 }
98 }
99
101 {
102 get
103 {
104 if (s_defaultEnumBaseTypeName == null)
105 {
106 s_defaultEnumBaseTypeName = new XmlQualifiedName("int", "http://www.w3.org/2001/XMLSchema");
107 }
109 }
110 }
111
113 {
114 get
115 {
117 {
118 s_enumerationValueAnnotationName = new XmlQualifiedName("EnumerationValue", "http://schemas.microsoft.com/2003/10/Serialization/");
119 }
121 }
122 }
123
125 {
126 get
127 {
129 {
130 s_surrogateDataAnnotationName = new XmlQualifiedName("Surrogate", "http://schemas.microsoft.com/2003/10/Serialization/");
131 }
133 }
134 }
135
137 {
138 get
139 {
140 if (s_defaultValueAnnotation == null)
141 {
142 s_defaultValueAnnotation = new XmlQualifiedName("DefaultValue", "http://schemas.microsoft.com/2003/10/Serialization/");
143 }
145 }
146 }
147
149 {
150 get
151 {
152 if (s_actualTypeAnnotationName == null)
153 {
154 s_actualTypeAnnotationName = new XmlQualifiedName("ActualType", "http://schemas.microsoft.com/2003/10/Serialization/");
155 }
157 }
158 }
159
161 {
162 get
163 {
165 {
166 s_isDictionaryAnnotationName = new XmlQualifiedName("IsDictionary", "http://schemas.microsoft.com/2003/10/Serialization/");
167 }
169 }
170 }
171
173 {
174 get
175 {
176 if (s_isValueTypeName == null)
177 {
178 s_isValueTypeName = new XmlQualifiedName("IsValueType", "http://schemas.microsoft.com/2003/10/Serialization/");
179 }
180 return s_isValueTypeName;
181 }
182 }
183
185 {
186 get
187 {
189 xmlSchemaAttribute.RefName = new XmlQualifiedName("FactoryType", "http://schemas.microsoft.com/2003/10/Serialization/");
190 return xmlSchemaAttribute;
191 }
192 }
193
203
213
219
220 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
221 internal void Export()
222 {
223 try
224 {
227 {
228 DataContract value = item.Value;
230 {
233 }
234 }
235 }
236 finally
237 {
238 _xmlDoc = null;
239 _dataContractSet = null;
240 }
241 }
242
244 {
245 if (!Schemas.Contains("http://schemas.microsoft.com/2003/10/Serialization/"))
246 {
247 StringReader input = new StringReader("<?xml version='1.0' encoding='utf-8'?>\r\n<xs:schema elementFormDefault='qualified' attributeFormDefault='qualified' xmlns:tns='http://schemas.microsoft.com/2003/10/Serialization/' targetNamespace='http://schemas.microsoft.com/2003/10/Serialization/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>\r\n <xs:element name='anyType' nillable='true' type='xs:anyType' />\r\n <xs:element name='anyURI' nillable='true' type='xs:anyURI' />\r\n <xs:element name='base64Binary' nillable='true' type='xs:base64Binary' />\r\n <xs:element name='boolean' nillable='true' type='xs:boolean' />\r\n <xs:element name='byte' nillable='true' type='xs:byte' />\r\n <xs:element name='dateTime' nillable='true' type='xs:dateTime' />\r\n <xs:element name='decimal' nillable='true' type='xs:decimal' />\r\n <xs:element name='double' nillable='true' type='xs:double' />\r\n <xs:element name='float' nillable='true' type='xs:float' />\r\n <xs:element name='int' nillable='true' type='xs:int' />\r\n <xs:element name='long' nillable='true' type='xs:long' />\r\n <xs:element name='QName' nillable='true' type='xs:QName' />\r\n <xs:element name='short' nillable='true' type='xs:short' />\r\n <xs:element name='string' nillable='true' type='xs:string' />\r\n <xs:element name='unsignedByte' nillable='true' type='xs:unsignedByte' />\r\n <xs:element name='unsignedInt' nillable='true' type='xs:unsignedInt' />\r\n <xs:element name='unsignedLong' nillable='true' type='xs:unsignedLong' />\r\n <xs:element name='unsignedShort' nillable='true' type='xs:unsignedShort' />\r\n <xs:element name='char' nillable='true' type='tns:char' />\r\n <xs:simpleType name='char'>\r\n <xs:restriction base='xs:int'/>\r\n </xs:simpleType>\r\n <xs:element name='duration' nillable='true' type='tns:duration' />\r\n <xs:simpleType name='duration'>\r\n <xs:restriction base='xs:duration'>\r\n <xs:pattern value='\\-?P(\\d*D)?(T(\\d*H)?(\\d*M)?(\\d*(\\.\\d*)?S)?)?' />\r\n <xs:minInclusive value='-P10675199DT2H48M5.4775808S' />\r\n <xs:maxInclusive value='P10675199DT2H48M5.4775807S' />\r\n </xs:restriction>\r\n </xs:simpleType>\r\n <xs:element name='guid' nillable='true' type='tns:guid' />\r\n <xs:simpleType name='guid'>\r\n <xs:restriction base='xs:string'>\r\n <xs:pattern value='[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}' />\r\n </xs:restriction>\r\n </xs:simpleType>\r\n <xs:attribute name='FactoryType' type='xs:QName' />\r\n <xs:attribute name='Id' type='xs:ID' />\r\n <xs:attribute name='Ref' type='xs:IDREF' />\r\n</xs:schema>\r\n");
249 {
251 }, null);
252 if (xmlSchema == null)
253 {
255 }
257 }
258 }
259
260 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
296
298 {
299 if (schema == null || dataContract.StableName.Namespace != dataContract.TopLevelElementNamespace.Value)
300 {
301 schema = GetSchema(dataContract.TopLevelElementNamespace.Value);
302 }
304 xmlSchemaElement.Name = dataContract.TopLevelElementName.Value;
308 return xmlSchemaElement;
309 }
310
311 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
313 {
317 XmlElement xmlElement = null;
318 if (classDataContract.UnderlyingType.IsGenericType)
319 {
320 xmlElement = ExportGenericInfo(classDataContract.UnderlyingType, "GenericType", "http://schemas.microsoft.com/2003/10/Serialization/");
321 }
323 for (int i = 0; i < classDataContract.Members.Count; i++)
324 {
328 XmlElement xmlElement2 = null;
331 {
335 }
336 else
337 {
339 }
341 if (dataMember.IsNullable)
342 {
344 }
345 if (!dataMember.IsRequired)
346 {
348 }
351 }
352 XmlElement xmlElement3 = null;
353 if (classDataContract.BaseContract != null)
354 {
357 if (classDataContract.IsReference && !classDataContract.BaseContract.IsReference)
358 {
360 }
361 }
362 else
363 {
365 if (classDataContract.IsValueType)
366 {
368 }
369 if (classDataContract.IsReference)
370 {
372 }
373 }
375 }
376
378 {
379 SchemaHelper.AddSchemaImport("http://schemas.microsoft.com/2003/10/Serialization/", schema);
380 schema.Namespaces.Add("ser", "http://schemas.microsoft.com/2003/10/Serialization/");
381 attributes.Add(IdAttribute);
382 attributes.Add(RefAttribute);
383 }
384
386 {
387 if (dataContract is XmlDataContract { IsAnonymous: not false } xmlDataContract)
388 {
390 return;
391 }
393 if (element.SchemaTypeName.Namespace.Equals("http://schemas.microsoft.com/2003/10/Serialization/"))
394 {
395 schema.Namespaces.Add("ser", "http://schemas.microsoft.com/2003/10/Serialization/");
396 }
397 SchemaHelper.AddSchemaImport(dataContract.StableName.Namespace, schema);
398 }
399
401 {
402 if (dataMember.HasConflictingNameAndType)
403 {
404 return true;
405 }
406 for (DataMember conflictingMember = dataMember.ConflictingMember; conflictingMember != null; conflictingMember = conflictingMember.ConflictingMember)
407 {
408 if (conflictingMember.HasConflictingNameAndType)
409 {
410 return true;
411 }
412 }
413 return false;
414 }
415
417 {
418 if (dataMember.EmitDefaultValue)
419 {
420 return null;
421 }
423 XmlAttribute xmlAttribute = XmlDoc.CreateAttribute("EmitDefaultValue");
424 xmlAttribute.Value = "false";
425 xmlElement.Attributes.Append(xmlAttribute);
426 return xmlElement;
427 }
428
430 {
431 return ExportActualType(typeName, XmlDoc);
432 }
433
435 {
437 XmlAttribute xmlAttribute = xmlDoc.CreateAttribute("Name");
438 xmlAttribute.Value = typeName.Name;
439 xmlElement.Attributes.Append(xmlAttribute);
440 XmlAttribute xmlAttribute2 = xmlDoc.CreateAttribute("Namespace");
442 xmlElement.Attributes.Append(xmlAttribute2);
443 return xmlElement;
444 }
445
446 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
447 private XmlElement ExportGenericInfo(Type clrType, string elementName, string elementNs)
448 {
449 int num = 0;
452 {
454 num++;
455 }
456 Type[] array = null;
457 IList<int> list = null;
458 if (clrType.IsGenericType)
459 {
460 array = clrType.GetGenericArguments();
461 string text;
462 if (clrType.DeclaringType == null)
463 {
464 text = clrType.Name;
465 }
466 else
467 {
468 int num2 = ((clrType.Namespace != null) ? clrType.Namespace.Length : 0);
469 if (num2 > 0)
470 {
471 num2++;
472 }
473 text = DataContract.GetClrTypeFullName(clrType).Substring(num2).Replace('+', '.');
474 }
475 int num3 = text.IndexOf('[');
476 if (num3 >= 0)
477 {
478 text = text.Substring(0, num3);
479 }
481 clrType = clrType.GetGenericTypeDefinition();
482 }
484 if (num > 0)
485 {
486 string text2 = xmlQualifiedName.Name;
487 for (int i = 0; i < num; i++)
488 {
489 text2 = "ArrayOf" + text2;
490 }
492 }
496 xmlElement.Attributes.Append(xmlAttribute);
499 xmlElement.Attributes.Append(xmlAttribute2);
500 if (array != null)
501 {
502 int num4 = 0;
503 int num5 = 0;
504 foreach (int item in list)
505 {
506 int num6 = 0;
507 while (num6 < item)
508 {
509 XmlElement xmlElement2 = ExportGenericInfo(array[num4], "GenericParameter", "http://schemas.microsoft.com/2003/10/Serialization/");
510 if (num5 > 0)
511 {
514 xmlElement2.Attributes.Append(xmlAttribute3);
515 }
516 xmlElement.AppendChild(xmlElement2);
517 num6++;
518 num4++;
519 }
520 num5++;
521 }
522 if (list[num5 - 1] == 0)
523 {
526 xmlElement.Attributes.Append(xmlAttribute4);
527 }
528 }
529 return xmlElement;
530 }
531
533 {
534 return null;
535 }
536
537 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
539 {
543 XmlElement xmlElement = null;
544 XmlElement xmlElement2 = null;
545 if (collectionDataContract.UnderlyingType.IsGenericType && CollectionDataContract.IsCollectionDataContract(collectionDataContract.UnderlyingType))
546 {
547 xmlElement = ExportGenericInfo(collectionDataContract.UnderlyingType, "GenericType", "http://schemas.microsoft.com/2003/10/Serialization/");
548 }
549 if (collectionDataContract.IsDictionary)
550 {
552 }
559 if (collectionDataContract.IsDictionary)
560 {
564 foreach (DataMember member in classDataContract.Members)
565 {
570 if (member.IsNullable)
571 {
573 }
576 }
579 }
580 else
581 {
582 if (collectionDataContract.IsItemTypeNullable)
583 {
585 }
588 }
592 if (collectionDataContract.IsReference)
593 {
595 }
596 }
597
604
606 {
614 SchemaHelper.AddSchemaImport(enumDataContract.BaseContractName.Namespace, schema);
615 if (enumDataContract.Values != null)
616 {
617 for (int i = 0; i < enumDataContract.Values.Count; i++)
618 {
622 {
624 }
626 }
627 }
628 if (enumDataContract.IsFlags)
629 {
635 }
636 else
637 {
639 }
640 }
641
642 internal static long GetDefaultEnumValue(bool isFlags, int index)
643 {
644 if (!isFlags)
645 {
646 return index;
647 }
648 return (long)Math.Pow(2.0, index);
649 }
650
651 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
653 {
655 xmlSchemaComplexType.Name = dataContract.StableName.Name;
657 XmlElement xmlElement = null;
658 if (dataContract.UnderlyingType.IsGenericType)
659 {
660 xmlElement = ExportGenericInfo(dataContract.UnderlyingType, "GenericType", "http://schemas.microsoft.com/2003/10/Serialization/");
661 }
662 XmlElement xmlElement2 = null;
663 if (dataContract.BaseContract != null)
664 {
666 }
667 else
668 {
669 schema.Namespaces.Add("ser", "http://schemas.microsoft.com/2003/10/Serialization/");
674 if (dataContract.IsValueType)
675 {
677 }
678 }
680 }
681
691
692 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
694 {
695 Type underlyingType = dataContract.UnderlyingType;
697 {
699 }
700 if (hasRoot)
701 {
702 typeName.Equals(dataContract.StableName);
703 if (SchemaHelper.GetSchemaElement(Schemas, new XmlQualifiedName(dataContract.TopLevelElementName.Value, dataContract.TopLevelElementNamespace.Value), out var outSchema) == null)
704 {
706 xmlSchemaElement.IsNillable = dataContract.IsTopLevelElementNullable;
708 }
711 if (xmlSchemaType == null && xsdType == null && typeName.Namespace != "http://www.w3.org/2001/XMLSchema")
712 {
714 }
715 if (xsdType != null)
716 {
718 }
719 }
720 }
721
722 private static void ReprocessAll(XmlSchemaSet schemas)
723 {
724 Hashtable hashtable = new Hashtable();
726 XmlSchema[] array = new XmlSchema[schemas.Count];
727 schemas.CopyTo(array, 0);
728 foreach (XmlSchema xmlSchema in array)
729 {
731 xmlSchema.Items.CopyTo(array2, 0);
733 {
737 {
738 hashtable3 = hashtable;
740 }
741 else
742 {
744 {
745 continue;
746 }
749 }
750 object obj = hashtable3[key];
751 if (obj != null)
752 {
754 }
755 else
756 {
758 }
759 }
760 schemas.Reprocess(xmlSchema);
761 }
762 }
763
764 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
778
779 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
781 {
782 xsdType = null;
783 hasRoot = true;
784 object[] customAttributes = clrType.GetCustomAttributes(Globals.TypeOfXmlSchemaProviderAttribute, inherit: false);
785 if (customAttributes == null || customAttributes.Length == 0)
786 {
788 return false;
789 }
792 {
794 hasRoot = false;
795 }
796 string methodName = xmlSchemaProviderAttribute.MethodName;
797 if (methodName == null || methodName.Length == 0)
798 {
800 {
802 }
804 }
805 else
806 {
807 MethodInfo method = clrType.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, new Type[1] { typeof(XmlSchemaSet) });
808 if (method == null)
809 {
811 }
812 if (!Globals.TypeOfXmlQualifiedName.IsAssignableFrom(method.ReturnType) && !Globals.TypeOfXmlSchemaType.IsAssignableFrom(method.ReturnType))
813 {
815 }
816 object obj = method.Invoke(null, new object[1] { schemas });
818 {
819 if (obj != null)
820 {
822 }
824 }
825 else if (obj == null)
826 {
828 hasRoot = false;
830 }
832 {
833 string localName = xmlSchemaType.Name;
834 string ns = null;
835 if (localName == null || localName.Length == 0)
836 {
838 stableName = new XmlQualifiedName(localName, ns);
841 }
842 else
843 {
844 foreach (XmlSchema item in schemas.Schemas())
845 {
846 foreach (XmlSchemaObject item2 in item.Items)
847 {
848 if (item2 == xmlSchemaType)
849 {
850 ns = item.TargetNamespace;
851 if (ns == null)
852 {
853 ns = string.Empty;
854 }
855 break;
856 }
857 }
858 if (ns != null)
859 {
860 break;
861 }
862 }
863 if (ns == null)
864 {
866 }
867 stableName = new XmlQualifiedName(localName, ns);
868 }
869 }
870 else
871 {
873 }
874 }
875 return true;
876 }
877
893
894 internal static void AddDefaultXmlType(XmlSchemaSet schemas, string localName, string ns)
895 {
897 xmlSchemaComplexType.Name = localName;
898 XmlSchema schema = SchemaHelper.GetSchema(ns, schemas);
900 schemas.Reprocess(schema);
901 }
902
916
928
930 {
931 xsdType = null;
932 hasRoot = true;
934 {
935 string text = null;
937 {
939 text = "XmlElement";
940 hasRoot = false;
941 }
942 else
943 {
945 text = "ArrayOfXmlNode";
946 hasRoot = true;
947 }
949 return true;
950 }
951 typeName = null;
952 return false;
953 }
954
955 private static void AddDefaultDatasetType(XmlSchemaSet schemas, string localName, string ns)
956 {
958 xmlSchemaComplexType.Name = localName;
961 xmlSchemaElement.RefName = new XmlQualifiedName("schema", "http://www.w3.org/2001/XMLSchema");
964 ((XmlSchemaSequence)xmlSchemaComplexType.Particle).Items.Add(item);
965 XmlSchema schema = SchemaHelper.GetSchema(ns, schemas);
967 schemas.Reprocess(schema);
968 }
969
984
994
996 {
997 if (nodes == null || nodes.Length == 0)
998 {
999 return null;
1000 }
1001 bool flag = false;
1002 for (int i = 0; i < nodes.Length; i++)
1003 {
1004 if (nodes[i] != null)
1005 {
1006 flag = true;
1007 break;
1008 }
1009 }
1010 if (!flag)
1011 {
1012 return null;
1013 }
1018 return xmlSchemaAnnotation;
1019 }
1020
1028
1029 private XmlSchema GetSchema(string ns)
1030 {
1031 return SchemaHelper.GetSchema(ns, Schemas);
1032 }
1033}
static ? object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture)
Definition Activator.cs:17
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
void Add(TKey key, TValue value)
static CultureInfo InvariantCulture
static double Pow(double x, double y)
void SetContractProcessed(DataContract dataContract)
DataContract GetMemberTypeDataContract(DataMember dataMember)
DataContract GetItemTypeDataContract(CollectionDataContract collectionContract)
bool IsContractProcessed(DataContract dataContract)
static string GetDefaultStableNamespace(Type type)
static DataContract GetBuiltInDataContract(Type type)
static string GetCollectionNamespace(string elementNs)
static XmlQualifiedName GetDefaultStableName(Type type)
static string GetClrTypeFullName(Type type)
static XmlQualifiedName GetStableName(Type type)
static List< int > GetDataContractNameForGenericName(string typeName, StringBuilder localName)
static XmlQualifiedName IdQualifiedName
Definition Globals.cs:357
static XmlQualifiedName RefQualifiedName
Definition Globals.cs:369
static void AddDefaultXmlType(XmlSchemaSet schemas, string localName, string ns)
static XmlSchemaSequence ISerializableSequence
static XmlQualifiedName SurrogateDataAnnotationName
XmlElement ExportEmitDefaultValue(DataMember dataMember)
XmlElement GetAnnotationMarkup(XmlQualifiedName annotationQualifiedName, string innerText, XmlSchema schema)
static XmlQualifiedName s_defaultValueAnnotation
static XmlSchemaComplexType CreateAnyType()
static XmlSchemaComplexType CreateAnyElementType()
static bool InvokeSchemaProviderMethod(Type clrType, XmlSchemaSet schemas, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot)
SchemaExporter(XmlSchemaSet schemas, DataContractSet dataContractSet)
static XmlQualifiedName EnumerationValueAnnotationName
void AddReferenceAttributes(XmlSchemaObjectCollection attributes, XmlSchema schema)
static void GetXmlTypeInfo(Type type, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot)
XmlSchemaElement ExportTopLevelElement(DataContract dataContract, XmlSchema schema)
static bool IsSpecialXmlType(Type type, [NotNullWhen(true)] out XmlQualifiedName typeName, [NotNullWhen(true)] out XmlSchemaType xsdType, out bool hasRoot)
bool CheckIfMemberHasConflict(DataMember dataMember)
static XmlElement ExportActualType(XmlQualifiedName typeName, XmlDocument xmlDoc)
XmlElement ExportGenericInfo(Type clrType, string elementName, string elementNs)
static void InvokeGetSchemaMethod([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type clrType, XmlSchemaSet schemas, XmlQualifiedName stableName)
static XmlSchemaAttribute ISerializableFactoryTypeAttribute
static XmlQualifiedName s_surrogateDataAnnotationName
static XmlQualifiedName IsDictionaryAnnotationName
void ExportCollectionDataContract(CollectionDataContract collectionDataContract, XmlSchema schema)
void ExportISerializableDataContract(ClassDataContract dataContract, XmlSchema schema)
XmlElement ExportActualType(XmlQualifiedName typeName)
static XmlQualifiedName s_isDictionaryAnnotationName
XmlSchemaAnnotation GetSchemaAnnotation(XmlQualifiedName annotationQualifiedName, string innerText, XmlSchema schema)
void ExportXmlDataContract(XmlDataContract dataContract)
static void AddDefaultDatasetType(XmlSchemaSet schemas, string localName, string ns)
void ExportDataContract(DataContract dataContract)
static long GetDefaultEnumValue(bool isFlags, int index)
static XmlQualifiedName s_enumerationValueAnnotationName
static XmlQualifiedName s_actualTypeAnnotationName
static void AddDefaultTypedDatasetType(XmlSchemaSet schemas, XmlSchema datasetSchema, string localName, string ns)
static XmlQualifiedName s_defaultEnumBaseTypeName
void ExportClassDataContract(ClassDataContract classDataContract, XmlSchema schema)
void ExportEnumDataContract(EnumDataContract enumDataContract, XmlSchema schema)
XmlSchemaComplexContentExtension CreateTypeContent(XmlSchemaComplexType type, XmlQualifiedName baseTypeName, XmlSchema schema)
void SetElementType(XmlSchemaElement element, DataContract dataContract, XmlSchema schema)
static void ReprocessAll(XmlSchemaSet schemas)
static XmlSchemaAnnotation GetSchemaAnnotation(params XmlNode[] nodes)
static XmlSchema GetSchema(string ns, XmlSchemaSet schemas)
static XmlSchemaElement GetSchemaElement(XmlSchemaSet schemas, XmlQualifiedName elementQName, out XmlSchema outSchema)
static XmlSchemaType GetSchemaType(XmlSchemaSet schemas, XmlQualifiedName typeQName, out XmlSchema outSchema)
static void AddSchemaImport(string ns, XmlSchema schema)
static void AddElementForm(XmlSchemaElement element, XmlSchema schema)
static string InvalidGetSchemaMethod
Definition SR.cs:150
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string MissingSchemaType
Definition SR.cs:682
static string MissingGetSchemaMethod
Definition SR.cs:208
static string InvalidXmlDataContractName
Definition SR.cs:164
static string InvalidNonNullReturnValueByIsAny
Definition SR.cs:156
static string CouldNotReadSerializationSchema
Definition SR.cs:680
static string InvalidReturnTypeOnGetSchemaMethod
Definition SR.cs:160
static string InvalidReturnSchemaOnGetSchemaMethod
Definition SR.cs:684
Definition SR.cs:7
XmlSchema Reprocess(XmlSchema schema)
void CopyTo(XmlSchema[] schemas, int index)
bool Contains(string? targetNamespace)
XmlSchema? Add(string? targetNamespace, string schemaUri)
static ? XmlSchema Read(TextReader reader, ValidationEventHandler? validationEventHandler)
Definition XmlSchema.cs:432
static ? string DecodeName(string? name)
Definition XmlConvert.cs:55
static string ToString(bool value)
XmlElement CreateElement(string name)
XmlAttribute CreateAttribute(string name)