Getting Started
Add the package, then use it in the test that produces the result,
dotnet add package Docfx.ResultSnippets
using Docfx.ResultSnippets;
The result of a call is written to a markdown file, which a docfx page can then include,
// some return value
const string result = "Some result to save";
// now it can be saved as an example
result.SaveResults();
// we can also add a part to the name
"Some other result".SaveResults(partName: "part2");
Which generates a Markdown file that can be added via the include file like so,
[!INCLUDE[SomeExample](some/path/to/code/__examples__/ClassName.MethodName.{Optional-PartName}.md)]
See SaveResults for more details about the file name format.