QuickPulse.Explains 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package QuickPulse.Explains --version 0.1.0
                    
NuGet\Install-Package QuickPulse.Explains -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="QuickPulse.Explains" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="QuickPulse.Explains" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="QuickPulse.Explains" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add QuickPulse.Explains --version 0.1.0
                    
#r "nuget: QuickPulse.Explains, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package QuickPulse.Explains@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=QuickPulse.Explains&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=QuickPulse.Explains&version=0.1.0
                    
Install as a Cake Tool

QuickPulse.Explains

QuickPulse.Explains is a lightweight documentation generator for C# projects, designed to turn [Doc]-annotated test classes and methods into clean, structured Markdown files. It leverages the QuickPulse library for declarative flow composition and supports both single-file and multi-file generation with namespace-based filtering.

Attribute-Based Documentation

Apply the [Doc] attribute to your test classes and methods:

[Doc(Order = "1", Caption = "The Calculator", Content = "This class calculates totals.")]
public class CalculatorTests
{
    [Fact]
    [Doc(Order = "1-1", Caption = "Empty Cart", Content = "An empty cart always totals to 0.")]
    public void EmptyCart_ReturnsZero() => ...
}

The Order defines hierarchy (1, 1-1, etc.), Caption becomes the header, and Content is the body text.

Single Markdown File Generation

To write all collected documentation into one Markdown file:

var doc = new Document();
doc.ToFile("docs.md", typeof(CalculatorTests).Assembly);

This emits headers and content based on the [Doc] attributes, using heading depth inferred from the order string.

Multi-File Generation with Namespace Filtering

Group output by namespace:

var doc = new Document();
doc.ToFiles([
    new DocFileInfo("domain.md", ["MyApp.Domain"]),
    new DocFileInfo("tests.md", ["MyApp.Tests"])
], Assembly.GetExecutingAssembly());

This allows documentation to be split by concern or target audience.

Bits and Alices

As I use aforementioned method off documenting stuff in all of my test projects, I will most likely end up putting all of the various tools which are duplicated across multiple projects right now inside of this little box over here.

LinesReader: Sequential Line Navigation

LinesReader is a lightweight utility intended for use in tests. It provides simple, sequential line-by-line reading over string content.

Creating a Reader

- From text input (newline-separated):

var reader = LinesReader.FromText(aString);

- From a list of strings:

var reader = LinesReader.FromStringList(new[] { "line1", "line2" });

Basic usage:

var reader = LinesReader.FromText(someText);
Assert.Equal("This is the first line of a two line text.", reader.NextLine());
reader.Skip();
Assert.True(reader.EndOfContent());

Error Handling:

LinesReader throws exceptions if:

  • You call NextLine() or Skip() past the end of the content.
  • You use the reader before it's initialized.
  • You call EndOfContent() when there are still lines to read.
AsAssertsToLogFile

.AsAssertsToLogFile() outputs the contents of the reader as xUnit Assert.Equal(...) statements, writing them to a log file using QuickPulse's default location:

.quickpulse\quick-pulse-{unique}.log. Example:

LinesReader.FromStringList(["one", "two"]).AsAssertsToLogFile();

Produces output like:

        Assert.Equal("one", reader.NextLine());
        Assert.Equal("two", reader.NextLine());
        Assert.True(reader.EndOfContent());
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.7 149 8/13/2025
0.2.6 137 8/12/2025
0.2.5 136 8/12/2025
0.2.4 149 8/12/2025
0.2.3 134 8/10/2025
0.2.2 117 8/9/2025
0.2.1 197 8/8/2025
0.2.0 210 8/6/2025
0.1.1 419 7/21/2025
0.1.0 229 7/19/2025