public Document(ISymUnmanagedDocument doc)
 {
     document = doc;
     contents = new Lazy <string>(() =>
     {
         bool isEmbedded;
         if (document.HasEmbeddedSource(out isEmbedded) == 0 && isEmbedded)
         {
             var rawContents = document.GetEmbeddedSource().ToArray();
             return(System.Text.Encoding.Default.GetString(rawContents));
         }
         else
         {
             return(File.Exists(Path) ? File.ReadAllText(Path) : null);
         }
     });
 }