220 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
245 if (!
Schemas.
Contains(
"http://schemas.microsoft.com/2003/10/Serialization/"))
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");
260 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
311 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
380 schema.Namespaces.
Add(
"ser",
"http://schemas.microsoft.com/2003/10/Serialization/");
395 schema.Namespaces.
Add(
"ser",
"http://schemas.microsoft.com/2003/10/Serialization/");
446 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
462 if (
clrType.DeclaringType ==
null)
487 for (
int i = 0; i < num; i++)
537 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
651 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
669 schema.Namespaces.
Add(
"ser",
"http://schemas.microsoft.com/2003/10/Serialization/");
692 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
711 if (
xmlSchemaType ==
null &&
xsdType ==
null && typeName.Namespace !=
"http://www.w3.org/2001/XMLSchema")
764 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
779 [
RequiresUnreferencedCode(
"Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
816 object obj =
method.Invoke(
null,
new object[1] { schemas });
825 else if (
obj ==
null)
835 if (localName ==
null || localName.Length == 0)
850 ns =
item.TargetNamespace;
945 text =
"ArrayOfXmlNode";
997 if (nodes ==
null || nodes.Length == 0)
1002 for (
int i = 0; i < nodes.Length; i++)
1004 if (nodes[i] !=
null)
static ? object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture)
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)
static bool IsCollectionDataContract(Type type)
static bool IsCollection(Type type)
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 Exception ThrowHelperError(Exception e)
static Type TypeOfXmlSchemaProviderAttribute
static Type TypeOfXmlNodeArray
static Type TypeOfXmlSchemaType
static Type TypeOfXmlQualifiedName
static Type TypeOfXmlElement
static XmlQualifiedName IdQualifiedName
static XmlQualifiedName RefQualifiedName
static XmlQualifiedName s_stringQualifiedName
static XmlQualifiedName StringQualifiedName
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)
static XmlQualifiedName s_isValueTypeName
SchemaExporter(XmlSchemaSet schemas, DataContractSet dataContractSet)
XmlElement ExportIsDictionary()
XmlSchema GetSchema(string ns)
static XmlSchemaAny ISerializableWildcardElement
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)
static XmlQualifiedName DefaultEnumBaseTypeName
void ExportISerializableDataContract(ClassDataContract dataContract, XmlSchema schema)
XmlElement ExportActualType(XmlQualifiedName typeName)
static XmlQualifiedName IsValueTypeName
static XmlQualifiedName s_isDictionaryAnnotationName
XmlElement ExportSurrogateData(object key)
void ExportSerializationSchema()
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 AnytypeQualifiedName
static XmlQualifiedName s_enumerationValueAnnotationName
static XmlQualifiedName s_anytypeQualifiedName
static XmlQualifiedName s_actualTypeAnnotationName
static void AddDefaultTypedDatasetType(XmlSchemaSet schemas, XmlSchema datasetSchema, string localName, string ns)
static XmlQualifiedName s_defaultEnumBaseTypeName
static XmlSchemaAttribute IdAttribute
static XmlQualifiedName ActualTypeAnnotationName
void ExportClassDataContract(ClassDataContract classDataContract, XmlSchema schema)
static XmlQualifiedName DefaultValueAnnotation
void ExportEnumDataContract(EnumDataContract enumDataContract, XmlSchema schema)
XmlSchemaComplexContentExtension CreateTypeContent(XmlSchemaComplexType type, XmlQualifiedName baseTypeName, XmlSchema schema)
DataContractSet _dataContractSet
readonly XmlSchemaSet _schemas
void SetElementType(XmlSchemaElement element, DataContract dataContract, XmlSchema schema)
static XmlSchemaAttribute RefAttribute
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
static string Format(string resourceFormat, object p1)
static string MissingSchemaType
static string MissingGetSchemaMethod
static string InvalidXmlDataContractName
static string InvalidNonNullReturnValueByIsAny
static string CouldNotReadSerializationSchema
static string InvalidReturnTypeOnGetSchemaMethod
static string InvalidReturnSchemaOnGetSchemaMethod
XmlQualifiedName SchemaTypeName
int Add(XmlSchemaObject item)
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)
static ? string DecodeName(string? name)
static string ToString(bool value)
XmlElement CreateElement(string name)
XmlAttribute CreateAttribute(string name)
DynamicallyAccessedMemberTypes
XmlSchemaContentProcessing