LogicalMethodInfo.IsBeginMethod Method

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

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

public:
static bool IsBeginMethod (
	MethodInfo^ methodInfo
)
public static boolean IsBeginMethod (
	MethodInfo methodInfo
)
public static function IsBeginMethod (
	methodInfo : MethodInfo
) : boolean
Not applicable.

Parameters

methodInfo

The MethodInfo that might be a Begin method of an asynchronous invocation.

Return Value

true if the methodInfo parameter is a Begin 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 ) );

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: