コード例 #1
0
        public override void Refresh()
        {
            base.Refresh();

            if (Theme != null && Theme.Behavior != null && IsHandleCreated)
            {
                var snapshot = new FakeSnapshot(Text);
                Analysis = new DocumentAnalyzer(snapshot, Theme.Behavior, IndentSize, IndentSize);
                IndentGuidePackage.JoinableTaskFactory.Run(async delegate {
                    await Analysis.ResetAsync().ContinueWith(_ => BeginInvoke((Action)Invalidate), TaskScheduler.Default).ConfigureAwait(true);
                });
            }
        }
コード例 #2
0
 private async System.Threading.Tasks.Task AnalyzeAndUpdateAdornmentsAsync(TextViewLayoutChangedEventArgs changes = null)
 {
     try {
         if (changes != null)
         {
             await Analysis.UpdateAsync(changes);
         }
         else
         {
             await Analysis.ResetAsync();
         }
     } catch (OperationCanceledException) {
         return;
     } catch (Exception ex) {
         Errors.Log(ex);
     }
     UpdateAdornments();
 }