Freigeben über


LogicalMethodInfo.IsEndMethod-Methode

Gibt einen Wert zurück, der angibt, ob die übergebene Methode eine End-Methode für einen asynchronen Aufruf darstellt.

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in system.web.services.dll)

Syntax

'Declaration
Public Shared Function IsEndMethod ( _
    methodInfo As MethodInfo _
) As Boolean
'Usage
Dim methodInfo As MethodInfo
Dim returnValue As Boolean

returnValue = LogicalMethodInfo.IsEndMethod(methodInfo)
public static bool IsEndMethod (
    MethodInfo methodInfo
)
public:
static bool IsEndMethod (
    MethodInfo^ methodInfo
)
public static boolean IsEndMethod (
    MethodInfo methodInfo
)
public static function IsEndMethod (
    methodInfo : MethodInfo
) : boolean

Parameter

  • methodInfo
    Die MethodInfo, die eine End-Methode für einen asynchronen Aufruf sein kann.

Rückgabewert

true, wenn der methodInfo-Parameter eine End-Methode für einen asynchronen Aufruf ist, andernfalls false.

Beispiel

' Get the type for the proxy class MyMath Web service.
' Note: The MyMath class is a proxy class generated by the Wsdl.exe 
' utility for the Math Web service. This class can also be found in 
' the SoapHttpClientProtocol Class example. 
Dim myType As Type = GetType(MyMath.MyMath)

Dim myBeginMethod As MethodInfo = myType.GetMethod("BeginAdd")
Dim myEndMethod As MethodInfo = myType.GetMethod("EndAdd")
Dim myMethod As MethodInfo = myType.GetMethod("Add")

Console.WriteLine(("Is 'BeginAdd' a Begin Method : " & _
   LogicalMethodInfo.IsBeginMethod(myBeginMethod).ToString()))
Console.WriteLine(("Is 'Add' a Begin Method : " & _
   LogicalMethodInfo.IsBeginMethod(myMethod).ToString()))
Console.WriteLine(("Is 'EndAdd' an End Method : " & _
   LogicalMethodInfo.IsEndMethod(myEndMethod).ToString()))
// Get the type for the proxy class MyMath Web service.
// Note: The MyMath class is a proxy class generated by the Wsdl.exe 
// utility for the Math Web service. This class can also be found in 
// the SoapHttpClientProtocol class example. 
Type myType = typeof(MyMath.MyMath);

MethodInfo myBeginMethod = myType.GetMethod("BeginAdd");
MethodInfo myEndMethod = myType.GetMethod("EndAdd");
MethodInfo myMethod = myType.GetMethod("Add");

Console.WriteLine("Is 'BeginAdd' a Begin Method : " + 
   LogicalMethodInfo.IsBeginMethod(myBeginMethod).ToString()); 
Console.WriteLine("Is 'Add' a Begin Method : " + 
   LogicalMethodInfo.IsBeginMethod(myMethod).ToString()); 
Console.WriteLine("Is 'EndAdd' an End Method : " + 
   LogicalMethodInfo.IsEndMethod(myEndMethod).ToString()); 
// Get the type for the proxy class MyMath Web service.
// Note: The MyMath class is a proxy class generated by the Wsdl.exe
// utility for the Math Web service. This class can also be found in
// the SoapHttpClientProtocol class example.
Type^ myType = MyMath::MyMath::typeid;
MethodInfo^ myBeginMethod = myType->GetMethod( "BeginAdd" );
MethodInfo^ myEndMethod = myType->GetMethod( "EndAdd" );
MethodInfo^ myMethod = myType->GetMethod( "Add" );
Console::WriteLine( "Is 'BeginAdd' a Begin Method : {0}", LogicalMethodInfo::IsBeginMethod( myBeginMethod ) );
Console::WriteLine( "Is 'Add' a Begin Method : {0}", LogicalMethodInfo::IsBeginMethod( myMethod ) );
Console::WriteLine( "Is 'EndAdd' an End Method : {0}", LogicalMethodInfo::IsEndMethod( myEndMethod ) );
// Get the type for the proxy class MyMath Web service.
// Note: The MyMath class is a proxy class generated by the Wsdl.exe 
// utility for the Math Web service. This class can also be found in 
// the SoapHttpClientProtocol class example. 
Type myType = MyMath.MyMath.class.ToType();

MethodInfo myBeginMethod = myType.GetMethod("BeginAdd");
MethodInfo myEndMethod = myType.GetMethod("EndAdd");
MethodInfo myMethod = myType.GetMethod("Add");

Console.WriteLine("Is 'BeginAdd' a Begin Method : " 
    + Convert.ToString(LogicalMethodInfo.IsBeginMethod(myBeginMethod)));
Console.WriteLine("Is 'Add' a Begin Method : " 
    + Convert.ToString(LogicalMethodInfo.IsBeginMethod(myMethod)));
Console.WriteLine("Is 'EndAdd' an End Method : " 
    + Convert.ToString(LogicalMethodInfo.IsEndMethod(myEndMethod)));

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

LogicalMethodInfo-Klasse
LogicalMethodInfo-Member
System.Web.Services.Protocols-Namespace