Skip to content

Instantly share code, notes, and snippets.

@myarichuk
Created December 10, 2017 13:06
Show Gist options
  • Save myarichuk/82142c6c1c20d9858d4c239559dd2bb6 to your computer and use it in GitHub Desktop.
Save myarichuk/82142c6c1c20d9858d4c239559dd2bb6 to your computer and use it in GitHub Desktop.
Dump Voron header contents into text files
FileHeader* one = stackalloc FileHeader[1];
FileHeader* two = stackalloc FileHeader[1];
if (!Win32Helper.TryReadFileHeader(one, "headers.one"))
throw new Win32Exception();
if (!Win32Helper.TryReadFileHeader(two, "headers.two"))
throw new Win32Exception();
var oneJson = RavenJObject.FromObject(*one);
File.WriteAllText("one.json", oneJson.ToString());
var twoJson = RavenJObject.FromObject(*two);
File.WriteAllText("two.json", twoJson.ToString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment