Op Englesch liesen Editéieren

Deelen iwwer


SoapServices.GetInteropTypeFromXmlType(String, String) Method

Definition

Retrieves the object Type that should be used during deserialization of an unrecognized object type with the given XML type name and namespace.

C#
public static Type GetInteropTypeFromXmlType(string xmlType, string xmlTypeNamespace);
C#
[System.Security.SecurityCritical]
public static Type GetInteropTypeFromXmlType(string xmlType, string xmlTypeNamespace);

Parameters

xmlType
String

The XML type of the unknown object type.

xmlTypeNamespace
String

The XML type namespace of the unknown object type.

Returns

The Type of object associated with the specified XML type name and namespace.

Attributes

Exceptions

The immediate caller does not have infrastructure permission.

Examples

The following code example shows how to use this method. This code example is part of a larger example provided for the SoapServices class.

C#
string interopTypeXmlElementName = 
    "ExampleClassElementName";
string interopTypeXmlNamespace = 
    "http://example.org/ExampleXmlNamespace";
Type interopType = SoapServices.GetInteropTypeFromXmlElement(
    interopTypeXmlElementName, 
    interopTypeXmlNamespace);
Console.WriteLine("The interop type is {0}.", interopType);

string interopTypeXmlTypeName = 
    "ExampleXmlTypeName";
string interopTypeXmlTypeNamespace = 
    "http://example.org/ExampleXmlTypeNamespace";
interopType = SoapServices.GetInteropTypeFromXmlType(
    interopTypeXmlTypeName, interopTypeXmlTypeNamespace);
Console.WriteLine("The interop type is {0}.", interopType);

Remarks

The current method returns values set up through RegisterInteropXmlType and PreLoad.

Applies to

Produkt Versiounen
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1