SoapServices.GetXmlNamespaceForMethodCall(MethodBase) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Haalt de XML-naamruimte op die wordt gebruikt tijdens externe aanroepen van de methode die in de opgegeven MethodBasemethode is opgegeven.
public:
static System::String ^ GetXmlNamespaceForMethodCall(System::Reflection::MethodBase ^ mb);
public static string GetXmlNamespaceForMethodCall(System.Reflection.MethodBase mb);
[System.Security.SecurityCritical]
public static string GetXmlNamespaceForMethodCall(System.Reflection.MethodBase mb);
static member GetXmlNamespaceForMethodCall : System.Reflection.MethodBase -> string
[<System.Security.SecurityCritical>]
static member GetXmlNamespaceForMethodCall : System.Reflection.MethodBase -> string
Public Shared Function GetXmlNamespaceForMethodCall (mb As MethodBase) As String
Parameters
- mb
- MethodBase
De MethodBase methode waarvoor de XML-naamruimte is aangevraagd.
Retouren
De XML-naamruimte die wordt gebruikt tijdens externe aanroepen van de opgegeven methode.
- Kenmerken
Uitzonderingen
De directe beller heeft geen infrastructuurmachtiging.
Voorbeelden
In het volgende codevoorbeeld ziet u hoe u deze methode gebruikt. Dit codevoorbeeld maakt deel uit van een groter voorbeeld voor de SoapServices klasse.
// 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 =
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);