LogicalMethodInfo::IsEndMethod Method (MethodInfo^)

 

Returns a value indicating whether the method passed in represents an End method of an asynchronous invocation.

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

public:
static bool IsEndMethod(
	MethodInfo^ methodInfo
)

Parameters

methodInfo
Type: System.Reflection::MethodInfo^

The MethodInfo that might be an End method of an asynchronous invocation.

Return Value

Type: System::Boolean

true if the methodInfo parameter is an End method of an asynchronous invocation; otherwise, false.

// 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 ) );

.NET Framework
Available since 1.1
Return to top
Show: