title: Design Review - Resolving IDispatcher Or Dispatcher instance
body: <p>I am in a process of extending <code>ObservableCollection&lt;T&gt;</code>, which will notify collection change back to UI thread from <code>ViewModel</code> in an ideal <code>MVVM</code> scenario. To achieve this, I am thinking of resolving UI <code>Dispatcher</code> through some <code>IOC</code> and eventually use the resolved <code>Dispatcher</code> instance within my custom observable type.</p>
  
  <p>Draft will look like this;</p>
  
  <pre><code>class SafeObservableCollection&lt;T&gt;: ObservableCollection&lt;T&gt;
  {
      public SafeObservableCollection(IDispatcher currentDispatcher)//maybe an instance of Dispatcher
      {
       //assign resolved dispatcher to a private member
      }
  }
  </code></pre>
  
  <p><em>Assumption:</em>  <em>(a) WPF application which uses one Dispatcher/UIThread. (b) I am not thinking of any deviation (APM/EPM using BackgroundWorker) apart from overriding base class members of ObservableCollection</em></p>
  
  <p><strong>Question</strong>: 
  Can you propose anything better to resolve Dispatcher instance while following the outlined code? Can you help me to nail down any possible design flaw? Such as memory leak, deadlock or anything which I overlooked.
  What should be / would be the lifetime of my Dispatcher instance if I decided to go with this approach.</p>