MsgPack.Rpc.Client.RpcClient.EndCall C# (CSharp) Method

EndCall() public method

Finishes asynchronous method invocation and returns its result.
You must call this method to clean up internal bookkeeping information and handles communication error even if the remote method returns void.
/// is null. /// /// is not valid type. /// /// is returned from other instance, /// or its state is not valid. /// /// Failed to execute specified remote method. ///
public EndCall ( IAsyncResult asyncResult ) : MessagePackObject
asyncResult IAsyncResult /// returned from . ///
return MessagePackObject
		public MessagePackObject EndCall( IAsyncResult asyncResult )
		{
			this.VerifyIsNotDisposed();

			var requestAsyncResult = AsyncResult.Verify<RequestMessageAsyncResult>( asyncResult, this );
			requestAsyncResult.WaitForCompletion();
			requestAsyncResult.Finish();
			var result = requestAsyncResult.Result;
			Contract.Assert( result != null );
			return result.Value;
		}