protected override void DoExecute(ExecutionEvent executionEvent) { _projectId = executionEvent.GetFirstSelectedTreeNavigationItem().ProjectId; try { ProgressCounter progressCounter = new ProgressCounter("Generate", "Generating the CSV files...", 1); LongRunningJob <GenerateDto> projectCreationJob = new LongRunningJob <GenerateDto>(GenerateAction, progressCounter); projectCreationJob.AddAction(delegate { _generateWindow.Dispatcher.Invoke(AfterGenerateAction, DispatcherPriority.Normal); }); projectCreationJob.Execute(_generateDto); } catch (Exception ex) { OnFailure(executionEvent); } }
public static void SaveJob(LongRunningJob job) { _jobStore.InsertOne(job); }
protected override async void OnInitialize() { base.OnInitialize(); await LongRunningJob.Run(this, this.LoadCategoriesAndProducts, "Loading products and categories..."); }
protected override async void OnInitialize() { base.OnInitialize(); await LongRunningJob.Run(this, this.LoadData, "Loading..."); }
public void PerformCalc() { Result = LongRunningJob.CalcSum(); }
protected async override void OnActivate() { base.OnActivate(); await LongRunningJob.Run(this, this.LoadRecentProducts, "Loading recent products..."); }
public async void PlaceOrder() { await LongRunningJob.Run(this, this.CreateOrder, "Placing order..."); }