/// <summary> /// 执行批量操作 /// </summary> /// <typeparam name="T">批量操作项类型</typeparam> /// <param name="request">执行批量操作请求数据列表</param> /// <param name="doAction">需要对每个数据项执行的操作</param> /// <returns>批量操作结果</returns> public static BatchActionResult <T> DoBatchAction <T, E>(List <BatchActionItem <T> > request, Action <T> doAction) where E : Exception { return(DoBatchAction <T>(request, doAction, ex => { if (!typeof(E).IsAssignableFrom(ex.GetType())) { ExceptionHelper.HandleException(ex); } })); }
public void Error(string message, Exception e) { Console.Out.WriteLine(DateTime.Now + " ERROR " + loggerName + " - " + message + "\n" + e.Message + "\n" + e.StackTrace); ExceptionHelper.HandleException(e, "[" + DateTime.Now + "] ERROR : " + loggerName + " - " + message, "MemcachedException", null); }