コード例 #1
0
 void OnLatestSourceFileChanged(object sender, LatestSourceFileChangedEventArgs e)
 {
     //Is the source file change significant?
     if (e.WasLatestSourceFileStale == true)
     {
         //Revaluate the inheritance adornments on the text view when we next have focus
         if (ContractsPackageAccessor.Current.VSOptionsPage.InheritanceOnMethods)
         {
             ContractsPackageAccessor.Current.QueueWorkItem(() => RevaluateMethodInheritanceAdornments(this), () => _textViewTracker.TextView.HasAggregateFocus);
         }
         if (ContractsPackageAccessor.Current.VSOptionsPage.InheritanceOnProperties)
         {
             ContractsPackageAccessor.Current.QueueWorkItem(() => RevaluatePropertyInheritanceAdornments(this), () => _textViewTracker.TextView.HasAggregateFocus);
         }
     }
 }
コード例 #2
0
    void OnLatestSourceFileChanged(object sender, LatestSourceFileChangedEventArgs e) {

      //Is the source file change significant?
      if (e.WasLatestSourceFileStale == true) {

        //Revaluate the inheritance adornments on the text view when we next have focus
        if (ContractsPackageAccessor.Current.VSOptionsPage.InheritanceOnMethods)
          ContractsPackageAccessor.Current.QueueWorkItem(() => RevaluateMethodInheritanceAdornments(this), () => _textViewTracker.TextView.HasAggregateFocus);
        if (ContractsPackageAccessor.Current.VSOptionsPage.InheritanceOnProperties)
          ContractsPackageAccessor.Current.QueueWorkItem(() => RevaluatePropertyInheritanceAdornments(this), () => _textViewTracker.TextView.HasAggregateFocus);
      }
    }