public OutlookProcessor() : base(null, false) { _tracer = new Tracer("OutlookProcessor"); try { OutlookSession.Init(this); OnSettingsChanged(null, null); IdlePeriod = Settings.IdlePeriod * 60000; ThreadName = "Outlook AsyncProcessor"; ThreadPriority = ThreadPriority.Normal; ThreadStarted += new EventHandler(_outlookProcessor_ThreadStarted); ThreadFinished += new EventHandler(_outlookProcessor_ThreadFinished); ProcessMessages = true; ExceptionHandler = new AsyncExceptionHandler(HandleException); _UIManager = Core.UIManager; _UIManager.RegisterIndicatorLight("Outlook", this, 10, OutlookPlugin.LoadIconFromAssembly("OutlookPlugin.Icons.outlook_idle.ico"), OutlookPlugin.LoadIconFromAssembly("OutlookPlugin.Icons.outlook_busy.ico"), OutlookPlugin.LoadIconFromAssembly("OutlookPlugin.Icons.outlook_stuck.ico")); _UIManager.MainWindowClosing += new System.ComponentModel.CancelEventHandler(_UIManager_MainWindowClosing); StartThread(); _inited = true; } catch (Exception exception) { SetLastException(exception); } }
private AsyncExceptionHandler CreateExceptionHandler() { exceptionHandler = new AsyncExceptionHandler(this.Dispatcher); exceptionHandler.Exception += (sender, e) => { var exception = e.Value; string ownMessage = string.Empty; switch (exception.Message) { case "Aggregation for Data Collection not possible!": ownMessage = "This error means that no single parameter is selected for Data Collection evaluation.\n" + "To fix this error go to \"Data Collection - Configuration\" window\n" + "[Evaluation -> Files -> Data collection -> Configuration -> Configuration]\n" + "end select at least one parameter to evaluation"; break; } var result = MessageBox.Show(this, "An error occured. The following information might help you decide to try to continue your work or not." + "\n\nOriginal exception: " + exception.Message + (string.IsNullOrWhiteSpace(ownMessage) ? string.Empty : "\n\nRemark: " + ownMessage) + "\n\nPress [Yes] to try again or [No] to try to continue." , exception.GetType().ToString(), MessageBoxButton.YesNo, MessageBoxImage.Error); e.Param.Value = (result == MessageBoxResult.Yes); }; return(exceptionHandler); }
internal ForEach(IEnumerable <T> collection, MethodProcessor <T> method, int initialDegreeOfParallelism, AsyncExceptionHandler <T> exceptionHandler) { _collection = collection; _method = method; _exceptionHandler = exceptionHandler; _gate = new AsyncCounterGate(initialDegreeOfParallelism); }
public Analyst(ProjectManager clerk, ShadowMaker shadowMaker, AsyncExceptionHandler exceptionHandler) { this.aex = exceptionHandler; this.shadowMaker = shadowMaker; this.clerk = clerk; this.Host = new ReportBindingSource(shadowMaker, exceptionHandler, clerk); //this.Host.DrawModel += new EventHandler<EventArgs<UserControl, bool>>(Host_DrawModel); this.Host.DrawPoints += new EventHandler <EventArgs <UserControl> >(Host_DrawPoints); this.Host.DrawCounters += new EventHandler <EventArgs <UserControl> >(Host_DrawCounters); this.Host.GenerateCountersReport += new EventHandler <EventArgs <DataTableEx, Dispatcher> >(Host_GenerateCountersReport); this.Host.GenerateTrTimesReport += new EventHandler <EventArgs <DataTableEx, Dispatcher> >(Host_GenerateTrTimesReport); this.Host.DrawSections += new EventHandler <EventArgs <UserControl> >(Host_DrawSections); this.Host.DrawTrTimes += new EventHandler <EventArgs <UserControl> >(Host_DrawTrTimes); }
public void setAsyncExceptionHandler(AsyncExceptionHandler handler) { this._javaWorkingMemory.setAsyncExceptionHandler(handler); }
IBuilder <T> IWhenExceptionHelper <IBuilder <T>, T> .WhenExceptionAsync(AsyncExceptionHandler <T> exceptionHandler) { return(WhenException(exceptionHandler)); }
IBuilderWithInitialDegreeOfParallelism <T> IWhenExceptionHelper <IBuilderWithInitialDegreeOfParallelism <T>, T> .WhenExceptionAsync(AsyncExceptionHandler <T> exceptionHandler) { return(WhenException(exceptionHandler)); }
private Impl <T> WhenException(AsyncExceptionHandler <T> exceptionHandler) { ExceptionHandler = exceptionHandler ?? throw new ArgumentNullException(nameof(exceptionHandler)); return(this); }
public ProjectManager(Dispatcher disp, AsyncExceptionHandler exceptionHandler) { this.aex = exceptionHandler; this.defaultContext = disp; }
public Experimenter(string modelName, ProjectManager manager, AsyncExceptionHandler exceptionHandler) { this.aex = exceptionHandler; this.modelName = modelName; this.manager = manager; }
public void SetExceptionHandler(AsyncExceptionHandler handler) { ExceptionHandler = handler; }