Exemple #1
0
 /// <summary>
 /// Prevents a default instance of the <see cref="AnalysisWriter"/> class from being created.
 /// </summary>
 private AnalysisWriter()
 {
     this.syncThread = new Thread(new ThreadStart(this.syncThread_DoWork));
     this.syncThread.IsBackground = false;
     this.syncThread.Name         = "Search Analysis Synchronization Thread";
     this.syncThread.Start();
     LibraryAnalysis.Subscribe(this);
 }
Exemple #2
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     if (!this.disposed)
     {
         LibraryAnalysis.Unsubscribe(this);
         this.ending = true;
         if (this.syncThread != null)
         {
             this.syncThread.Join();
             this.syncThread = null;
         }
         if (this.searches != null)
         {
             this.searches.Clear();
             this.searches = null;
         }
         if (this.reads != null)
         {
             this.reads.Clear();
             this.reads = null;
         }
         this.disposed = true;
     }
 }