LogicalMethodInfo.IsBeginMethod メソッド
渡されたメソッドが非同期呼び出しの Begin メソッドを表しているかどうかを示す値を返します。
Public Shared Function IsBeginMethod( _
ByVal methodInfo As MethodInfo _) As Boolean
[C#]
public static bool IsBeginMethod(MethodInfomethodInfo);
[C++]
public: static bool IsBeginMethod(MethodInfo* methodInfo);
[JScript]
public static function IsBeginMethod(
methodInfo : MethodInfo) : Boolean;
パラメータ
- methodInfo
非同期呼び出しの Begin メソッドである可能性のある MethodInfo 。
戻り値
methodInfo パラメータが、非同期呼び出しの Begin メソッドである場合は true 。それ以外の場合は 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.
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()))
[C#]
// 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());
[C++]
// 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(S"BeginAdd");
MethodInfo* myEndMethod = myType->GetMethod(S"EndAdd");
MethodInfo* myMethod = myType->GetMethod(S"Add");
Console::WriteLine(S"Is 'BeginAdd' a Begin Method : {0}", __box(LogicalMethodInfo::IsBeginMethod(myBeginMethod)));
Console::WriteLine(S"Is 'Add' a Begin Method : {0}", __box(LogicalMethodInfo::IsBeginMethod(myMethod)));
Console::WriteLine(S"Is 'EndAdd' an End Method : {0}", __box(LogicalMethodInfo::IsEndMethod(myEndMethod)));
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
LogicalMethodInfo クラス | LogicalMethodInfo メンバ | System.Web.Services.Protocols 名前空間