public void TestDetectClose()
 {
     Directory dir = new IsolatedStorageDirectory(IndexDir);
     dir.Close();
     try
     {
         dir.CreateOutput("test");
         Assert.Fail("did not hit expected exception");
     }
     catch (AlreadyClosedException ace)
     {
     }
 }
 public static void Remove(string dirName)
 {
     var dir = new IsolatedStorageDirectory(dirName);
     dir.Remove();
     dir.Close();
 }