SoapServices.GetXmlTypeForInteropType(Type, String, String) 메서드

정의

지정된 Type형식을 serialize할 때 사용해야 하는 XML 형식 정보를 반환합니다.

public:
 static bool GetXmlTypeForInteropType(Type ^ type, [Runtime::InteropServices::Out] System::String ^ % xmlType, [Runtime::InteropServices::Out] System::String ^ % xmlTypeNamespace);
public static bool GetXmlTypeForInteropType(Type type, out string xmlType, out string xmlTypeNamespace);
[System.Security.SecurityCritical]
public static bool GetXmlTypeForInteropType(Type type, out string xmlType, out string xmlTypeNamespace);
static member GetXmlTypeForInteropType : Type * string * string -> bool
[<System.Security.SecurityCritical>]
static member GetXmlTypeForInteropType : Type * string * string -> bool
Public Shared Function GetXmlTypeForInteropType (type As Type, ByRef xmlType As String, ByRef xmlTypeNamespace As String) As Boolean

매개 변수

type
Type

XML 요소 및 네임스페이스 이름이 요청된 개체 Type 입니다.

xmlType
String

지정한 개체의 XML 형식입니다 Type.

xmlTypeNamespace
String

지정된 개체의 XML 형식 네임스페이스입니다 Type.

반품

true 요청된 값에 플래그가 지정되어 SoapTypeAttribute있으면 이고, false그렇지 않으면 .

특성

예외

즉시 호출자에게 인프라 권한이 없습니다.

예제

다음 코드 예제에서는이 메서드를 사용 하는 방법을 보여 있습니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 SoapServices 일부입니다.

// Get the XML type name and the XML type namespace for
// an Interop type.
String^ xmlTypeName;
String^ xmlTypeNamespace;
isSoapTypeAttribute = SoapServices::GetXmlTypeForInteropType( ExampleNamespace::ExampleClass::typeid,xmlTypeName,xmlTypeNamespace );

// Print whether the requested value was flagged
// with a SoapTypeAttribute.
if ( isSoapTypeAttribute )
{
   Console::WriteLine( L"The requested value was flagged "
   L"with the SoapTypeAttribute." );
}
else
{
   Console::WriteLine( L"The requested value was not flagged "
   L"with the SoapTypeAttribute." );
}

// Print the XML type name and the XML type namespace.
Console::WriteLine( L"The XML type for the type "
L"ExampleNamespace.ExampleClass is {0}.", xmlTypeName );
Console::WriteLine( L"The XML type namespace for the type "
L"ExampleNamespace.ExampleClass is {0}.", xmlTypeNamespace );
// Get the XML type name and the XML type namespace for 
// an Interop type.
string xmlTypeName;
string xmlTypeNamespace;
isSoapTypeAttribute =
    SoapServices.GetXmlTypeForInteropType(
    typeof(ExampleNamespace.ExampleClass), 
    out xmlTypeName, out xmlTypeNamespace);

// Print whether the requested value was flagged 
// with a SoapTypeAttribute.
if (isSoapTypeAttribute)
{
    Console.WriteLine(
        "The requested value was flagged " +
        "with the SoapTypeAttribute.");
}
else 
{
    Console.WriteLine(
        "The requested value was not flagged " +
        "with the SoapTypeAttribute.");
}

// Print the XML type name and the XML type namespace.
Console.WriteLine(
    "The XML type for the type " +
    "ExampleNamespace.ExampleClass is {0}.",
    xmlTypeName);
Console.WriteLine(
    "The XML type namespace for the type " +
    "ExampleNamespace.ExampleClass is {0}.",
    xmlTypeNamespace);

적용 대상

추가 정보