public static void Dispatch(ReflectInsightPackage package, Int32 destinationBindingGroupId) { try { MessageQueue.SendMessage(new BoundReflectInsightPackage() { BindingGroupId = destinationBindingGroupId, Package = package }); } catch (Exception ex) { RIExceptionManager.PublishIfEvented(ex, "Failed during: ReflectInsightDispatcher.Dispatch()"); } }
public static void Dispatch(IEnumerable <ReflectInsightPackage> packages, Int32 destinationBindingGroupId) { try { List <BoundReflectInsightPackage> boundPackages = new List <BoundReflectInsightPackage>(); foreach (ReflectInsightPackage package in packages) { boundPackages.Add(new BoundReflectInsightPackage() { BindingGroupId = destinationBindingGroupId, Package = package }); } MessageQueue.SendMessages(boundPackages); } catch (Exception ex) { RIExceptionManager.PublishIfEvented(ex, "Failed during: ReflectInsightDispatcher.Dispatch()"); } }
static private void ExecuteProcessMessages() { try { while (true) { Thread.Sleep(FSleep); ProcessMessages(); if (DebugManager.DebugMessageProcessEnabled) { continue; } lock (FLockObject) { if (!MessageQueue.HasMessages) { break; } } Thread.Sleep(FSleep); } } catch (ThreadAbortException) { } catch (Exception ex) { RIExceptionManager.PublishIfEvented(new ReflectInsightException("MessageManager.ExecuteProcessMessages detected an unhandled exception. Please see inner exception for more details.", ex)); RIEventManager.DoOnQueueException(ex); } finally { IsProcessing = false; } }
private void OnWriterThreadException(Exception ex) { RIExceptionManager.PublishIfEvented(ex); }