private async void viewApiDumpClassic_Click(object sender, EventArgs e) { await lockWindowAndRunTask(async() => { string branch = getBranch(); string apiFilePath = await getApiDumpFilePath(branch); string apiJson = File.ReadAllText(apiFilePath); ReflectionDatabase api = ReflectionDatabase.Load(apiJson); ReflectionDumper dumper = new ReflectionDumper(api); string result = dumper.Run(); FileInfo info = new FileInfo(apiFilePath); string directory = info.DirectoryName; string resultPath = Path.Combine(directory, branch + "-api-dump.txt"); writeAndViewFile(resultPath, result); }); }
public void WriteHtml(ReflectionDumper buffer, int numTabs = 0) { string typeVal = GetSignature(true); if (typeVal.StartsWith("Enum.")) { buffer.OpenClassTag("EnumName Type", numTabs); buffer.Write("Enum"); buffer.CloseClassTag(); typeVal = typeVal.Substring(5); } string typeTag = "Type"; if (IsReturnType) { typeTag += " WithReturn"; } buffer.OpenClassTag(typeTag, numTabs); buffer.Write(typeVal); buffer.CloseClassTag(); }