public void Execute(OperationHandlers operationHandlers) { var info = new OperationInfo { OperationId = _operationIdFactory.GetNextId() }; operationHandlers.OnBeforeExecute(info); try { operationHandlers.Execute(info); } catch (Exception e) { Logger.LogError(e, "Error executing operation {0}", _operationIdFactory.GetNextId()); operationHandlers.OnError(info, e); } }
public void Execute(OperationHandlers operationHandlers) { var info = new OperationInfo { OperationId = _operationIdFactory.GetNextId() }; operationHandlers.OnBeforeExecute(info); try { operationHandlers.Execute(info); } catch (Exception e) { Logger.LogError(e, "Error executing operation {0}", _operationIdFactory.GetNextId()); operationHandlers.OnError(info, e); } }