コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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...");
 }
コード例 #4
0
 protected override async void OnInitialize()
 {
     base.OnInitialize();
     await LongRunningJob.Run(this, this.LoadData, "Loading...");
 }
コード例 #5
0
 public void PerformCalc()
 {
     Result = LongRunningJob.CalcSum();
 }
コード例 #6
0
 protected async override void OnActivate()
 {
     base.OnActivate();
     await LongRunningJob.Run(this, this.LoadRecentProducts, "Loading recent products...");
 }
コード例 #7
0
 public async void PlaceOrder()
 {
     await LongRunningJob.Run(this, this.CreateOrder, "Placing order...");
 }