다음을 통해 공유


LogicalMethodInfo.IsEndMethod(MethodInfo) 메서드

정의

전달되는 메서드가 비동기식으로 호출되는 End 메서드를 나타내는지 여부를 나타내는 값을 반환합니다.

public:
 static bool IsEndMethod(System::Reflection::MethodInfo ^ methodInfo);
public static bool IsEndMethod (System.Reflection.MethodInfo methodInfo);
static member IsEndMethod : System.Reflection.MethodInfo -> bool
Public Shared Function IsEndMethod (methodInfo As MethodInfo) As Boolean

매개 변수

methodInfo
MethodInfo

비동기식으로 호출되는 End 메서드가 될 수 있는 MethodInfo입니다.

반환

methodInfo 매개 변수가 비동기식으로 호출되는 true 메서드이면 End를 반환하고, 그렇지 않으면 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 = 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. 
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()))

적용 대상