private void RunCallback(SchemaItem schemaItem, CallbackAction actionName) { if (schemaItem.Callback == null) { return; } string callbackName = schemaItem.Callback.Method + "," + schemaItem.Callback.Type; var timer = new Stopwatch(); timer.Start(); try { var args = new object[] { transatedConnection, transaction, actionName, version }; CallbackHelper.RunCallback(delegateType, callbackName, args, argTypes); } catch (Exception ex) { throw new Exception("Error in " + actionName + " callback", ex); } finally { timer.Stop(); if (timer.ElapsedMilliseconds > 20) { DebugLog("Callback: {2} {0} {1}ms", callbackName, timer.ElapsedMilliseconds, actionName); } } }
private void RunCallback(SchemaItem schemaItem, CallbackAction actionName) { if (schemaItem.Callback == null) return; string callbackName = schemaItem.Callback.Method + "," + schemaItem.Callback.Type; var timer = new Stopwatch(); timer.Start(); try { var args = new object[] { transatedConnection, transaction, actionName, version }; CallbackHelper.RunCallback(delegateType, callbackName, args, argTypes); } catch (Exception ex) { throw new Exception("Error in " + actionName + " callback", ex); } finally { timer.Stop(); if (timer.ElapsedMilliseconds > 20) DebugLog("Callback: {2} {0} {1}ms", callbackName, timer.ElapsedMilliseconds, actionName); } }