LogicalMethodInfo.IsBeginMethod(MethodInfo) Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Devuelve un valor que indica si el método pasado representa un método Begin
de una invocación asincrónica.
public:
static bool IsBeginMethod(System::Reflection::MethodInfo ^ methodInfo);
public:
static bool IsBeginMethod(System::Reflection::MethodInfo ^ method_info);
public static bool IsBeginMethod (System.Reflection.MethodInfo methodInfo);
public static bool IsBeginMethod (System.Reflection.MethodInfo method_info);
static member IsBeginMethod : System.Reflection.MethodInfo -> bool
static member IsBeginMethod : System.Reflection.MethodInfo -> bool
Public Shared Function IsBeginMethod (methodInfo As MethodInfo) As Boolean
Public Shared Function IsBeginMethod (method_info As MethodInfo) As Boolean
Parámetros
- methodInfomethod_info
- MethodInfo
MethodInfo que puede ser un método Begin
de una invocación asincrónica.
Devoluciones
Es true
si el parámetro methodInfo
es un método Begin
de una invocación asincrónica; en caso contrario, es false
.
Ejemplos
// 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()))