title: Looking for a simple standalone persistent dictionary implementation in C#
body: <p>For an open source project I am looking for a good, simple implementation of a Dictionary that is backed by a file. Meaning, if an application crashes or restarts the dictionary will keep its state. I would like it to update the underlying file every time the dictionary is touched. (Add a value or remove a value). A FileWatcher is not required but it could be useful. </p>
  
  <pre><code>class PersistentDictionary&lt;T,V&gt; : IDictionary&lt;T,V&gt;
  {
      public PersistentDictionary(string filename)
      {
  
      } 
  }
  </code></pre>
  
  <p>Requirements: </p>
  
  <ul>
  <li>Open Source, with no dependency on native code (no sqlite) </li>
  <li>Ideally a very short and simple implementation</li>
  <li>When setting or clearing a value it should not re-write the entire underlying file, instead it should seek to the position in the file and update the value.</li>
  </ul>
  
  <p><strong>Similar Questions</strong> </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/108435/persistent-binary-tree-hash-table-in-net">Persistent Binary Tree / Hash table in .Net</a></li>
  <li><a href="https://stackoverflow.com/questions/408401/disk-backed-dictionary-cache-for-c">Disk backed dictionary/cache for c#</a></li>
  <li><a href="http://izlooite.blogspot.com/2011/04/persistent-dictionary.html" rel="noreferrer"><code>PersistentDictionary&lt;Key,Value&gt;</code></a></li>
  </ul>