LogicalMethodInfo.IsEndMethod(MethodInfo) Metodo

Definizione

Restituisce un valore che indica se il metodo passato rappresenta un metodo End di una chiamata asincrona.

public static bool IsEndMethod (System.Reflection.MethodInfo methodInfo);
public static bool IsEndMethod (System.Reflection.MethodInfo method_info);

Parametri

methodInfomethod_info
MethodInfo

Oggetto MethodInfo che può corrispondere a un metodo End di una chiamata asincrona.

Restituisce

Boolean

true se il parametro methodInfo è un metodo End di una chiamata asincrona; in caso contrario, false.

Esempio


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

Si applica a

Prodotto Versioni
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8