Sdílet prostřednictvím


SoapServices.GetInteropTypeFromXmlType(String, String) Metoda

Definice

Načte objekt Type , který by měl být použit při deserializaci nerozpoznaného typu objektu s daným názvem typu XML a oborem názvů.

public:
 static Type ^ GetInteropTypeFromXmlType(System::String ^ xmlType, System::String ^ xmlTypeNamespace);
public static Type GetInteropTypeFromXmlType (string xmlType, string xmlTypeNamespace);
[System.Security.SecurityCritical]
public static Type GetInteropTypeFromXmlType (string xmlType, string xmlTypeNamespace);
static member GetInteropTypeFromXmlType : string * string -> Type
[<System.Security.SecurityCritical>]
static member GetInteropTypeFromXmlType : string * string -> Type
Public Shared Function GetInteropTypeFromXmlType (xmlType As String, xmlTypeNamespace As String) As Type

Parametry

xmlType
String

Typ XML neznámého typu objektu.

xmlTypeNamespace
String

Obor názvů typu XML neznámého typu objektu.

Návraty

objektu Type přidruženého k zadanému názvu a oboru názvů typu XML.

Atributy

Výjimky

Bezprostřední volající nemá oprávnění k infrastruktuře.

Příklady

Následující příklad kódu ukazuje, jak tuto metodu použít. Tento příklad kódu je součástí většího příkladu SoapServices pro třídu .

String^ interopTypeXmlElementName = L"ExampleClassElementName";
String^ interopTypeXmlNamespace = L"http://example.org/ExampleXmlNamespace";
Type^ interopType = SoapServices::GetInteropTypeFromXmlElement(
   interopTypeXmlElementName, interopTypeXmlNamespace );
Console::WriteLine( L"The interop type is {0}.", interopType );
String^ interopTypeXmlTypeName = L"ExampleXmlTypeName";
String^ interopTypeXmlTypeNamespace =
   L"http://example.org/ExampleXmlTypeNamespace";
interopType = SoapServices::GetInteropTypeFromXmlType(
   interopTypeXmlTypeName,interopTypeXmlTypeNamespace );
Console::WriteLine( L"The interop type is {0}.", interopType );
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);

Poznámky

Aktuální metoda vrací hodnoty nastavené prostřednictvím RegisterInteropXmlType a PreLoad.

Platí pro