public static void CallBackCommonAsyncReturn(IAsyncResult result, string Handle) { CallBackCommonFunc handler = (CallBackCommonFunc)result.AsyncState; try { handler.EndInvoke(result); result.AsyncWaitHandle.Close(); } catch (Exception e) { ClassCommonSetting.ThrowException(handler, Handle, e); } }
private void UpdateAsyncReturn(IAsyncResult result) { UpdateTimeUsageHandler handler = (UpdateTimeUsageHandler)((AsyncResult)result).AsyncDelegate; try { handler.EndInvoke(result); result.AsyncWaitHandle.Close(); } catch (Exception e) { ClassCommonSetting.ThrowException(handler, "UpdateTimeUsage", e); } }