Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Ruft den XML-Namespace ab, der bei Remoteaufrufen der Methode verwendet wird, die in der bestimmten MethodBase angegeben ist.
Namespace: System.Runtime.Remoting
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Shared Function GetXmlNamespaceForMethodCall ( _
mb As MethodBase _
) As String
'Usage
Dim mb As MethodBase
Dim returnValue As String
returnValue = SoapServices.GetXmlNamespaceForMethodCall(mb)
public static string GetXmlNamespaceForMethodCall (
MethodBase mb
)
public:
static String^ GetXmlNamespaceForMethodCall (
MethodBase^ mb
)
public static String GetXmlNamespaceForMethodCall (
MethodBase mb
)
public static function GetXmlNamespaceForMethodCall (
mb : MethodBase
) : String
Parameter
- mb
Die MethodBase der Methode, für die der XML-Namespace angefordert wurde.
Rückgabewert
Der XML-Namespace, der während Remoteaufrufen der angegebenen Methode verwendet wird.
Ausnahmen
| Ausnahmetyp | Bedingung |
|---|---|
Der direkte Aufrufer verfügt nicht über die Berechtigung für die Infrastruktur. |
Beispiel
Im folgenden Codebeispiel wird die Verwendung dieser Methode veranschaulicht. Dieses Codebeispiel ist Teil eines umfangreicheren Beispiels für die SoapServices-Klasse.
// Print the XML namespace for a method invocation and its
// response.
System.Reflection.MethodBase getHelloMethod =
typeof(ExampleNamespace.ExampleClass).GetMethod("GetHello");
string methodCallXmlNamespace =
SoapServices.GetXmlNamespaceForMethodCall(getHelloMethod);
string methodResponseXmlNamespace =
SoapServices.GetXmlNamespaceForMethodResponse(getHelloMethod);
Console.WriteLine(
"The XML namespace for the invocation of the method " +
"GetHello in ExampleClass is {0}.",
methodResponseXmlNamespace);
Console.WriteLine(
"The XML namespace for the response of the method " +
"GetHello in ExampleClass is {0}.",
methodCallXmlNamespace);
// Print the XML namespace for a method invocation and its
// response.
System::Reflection::MethodBase^ getHelloMethod =
ExampleNamespace::ExampleClass::typeid->GetMethod( L"GetHello" );
String^ methodCallXmlNamespace =
SoapServices::GetXmlNamespaceForMethodCall( getHelloMethod );
String^ methodResponseXmlNamespace =
SoapServices::GetXmlNamespaceForMethodResponse( getHelloMethod );
Console::WriteLine( L"The XML namespace for the invocation of the method "
L"GetHello in ExampleClass is {0}.", methodResponseXmlNamespace );
Console::WriteLine( L"The XML namespace for the response of the method "
L"GetHello in ExampleClass is {0}.", methodCallXmlNamespace );
// Print the XML namespace for a method invocation and its
// response.
System.Reflection.MethodBase getHelloMethod = ExampleNamespace.
ExampleClass.class.ToType().GetMethod("GetHello");
String methodCallXmlNamespace = SoapServices.
GetXmlNamespaceForMethodCall(getHelloMethod);
String methodResponseXmlNamespace = SoapServices.
GetXmlNamespaceForMethodResponse(getHelloMethod);
Console.WriteLine("The XML namespace for the invocation of the method "
+ "GetHello in ExampleClass is {0}.", methodResponseXmlNamespace);
Console.WriteLine("The XML namespace for the response of the method "
+ "GetHello in ExampleClass is {0}.", methodCallXmlNamespace);
.NET Framework-Sicherheit
- SecurityPermission für die Verwendung von Infrastrukturcode. Zugeordnete Enumeration: SecurityPermissionFlag.Infrastructure
Plattformen
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
SoapServices-Klasse
SoapServices-Member
System.Runtime.Remoting-Namespace