Ejemplo n.º 1
0
            public void OnDialogClosed(IQuickFilingDialog qfDialog)
            {
                if (!Electron.WindowManager.BrowserWindows.Any() || qfDialog.SelectedItem == null)
                {
                    return;
                }

                var hierarchyId = qfDialog.SelectedItem;
                var javascript  = $"{callbackFunction}('{hierarchyId}')";

                AsyncUtil.RunSync(() => ElectronUtils.ExecuteJavascript(javascript));
            }
Ejemplo n.º 2
0
        public async Task <AnalysisSessionVm> Handle(Request request, CancellationToken cancellationToken)
        {
            var navigationProviderInfo = await dbContext.NavigationProvidersInfo
                                         .Where(p => p.Id == request.NavigationProviderId)
                                         .SingleAsync(cancellationToken);

            oneNoteNavigationProvider.SetParameters(navigationProviderInfo);

            var options = new AnalyzerOptions()
            {
                Depth = AnalyzeDepth.All
            };


            var analysisSession = await analyzer.AnalyzeAsync(oneNoteNavigationProvider, options, async (documentId, parseResult) =>
            {
                var javascript = $"{request.DocumentProcessedCallbackFunction}('{documentId.DocumentId}')";
                await ElectronUtils.ExecuteJavascript(javascript);
            }, cancellationToken);

            return(mapper.Map <AnalysisSessionVm>(analysisSession));
        }