This topic has not yet been rated - Rate this topic

LogicalMethodInfo.IsEndMethod Method

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

Namespace:  System.Web.Services.Protocols
Assembly:  System.Web.Services (in System.Web.Services.dll)
public static bool IsEndMethod(
	MethodInfo methodInfo
)

Parameters

methodInfo
Type: System.Reflection.MethodInfo

The MethodInfo that might be an End method of an asynchronous invocation.

Return Value

Type: System.Boolean
true if the methodInfo parameter is an End 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 = 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()); 

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.