NuGet Packages
Browse our open source NuGet packages available on nuget.org.
NTokenizers
A powerful and flexible collection of stream-based tokenizers designed for high-performance processing of XML, JSON, HTML, YAML, Markdown, TypeScript, CSS, C# and SQL.
await [Language]Tokenizer.Create().ParseAsync(stream, onToken: async token =>
{
// Handle tokens as they arrive
});// Fragment (body-only)
string html = MarkdownConverter.ToHtml(markdown);
// Stream-to-stream conversion
await MarkdownConverter.WriteHtmlDocumentAsync(inputStream, writer);NTokenizers.Extensions.Spectre.Console
Bring your console output to life with rich, styled syntax highlighting. These Spectre.Console extensions seamlessly build on NTokenizers and support XML, JSON, Markdown, TypeScript, CSS, C# and SQL.
await AnsiConsole.Console.WriteMarkdownAsync(stream);FluentDefaults
Define default values clearly and expressively using a fluent API. FluentDefaults improves readability and consistency in your .NET code, inspired by the elegance of FluentValidation.
public class PersonDefaulter : AbstractDefaulter<Person>
{
public PersonDefaulter()
{
DefaultFor(x => x.Id).Is(() => Guid.NewGuid());
DefaultFor(x => x.IsVip).Is(false);
DefaultFor(x => x.Discount).Is(20m).When(x => x.IsVip == true);
DefaultFor(x => x.Discount).Is(10m).When(x => x.IsVip == false);
}
}SourceDepend
Reduce boilerplate and boost productivity with this C# source generator. SourceDepend leverages Roslyn to automatically generate dependency injection constructors at compile time.
public partial class ExampleService
{
[Dependency] private readonly IRepository repository;
[Dependency] private readonly ILogger logger;
// Constructor is generated automatically
}NameCaser
Effortlessly convert PascalCase to other naming conventions. Perfect for code generation, serialization, and maintaining consistent naming across your .NET projects.
using NameCaser;
var simple = "SomeSimpleString";
Console.WriteLine(simple.ToCamelCase()); // someSimpleString
Console.WriteLine(simple.ToSnakeCase()); // some_simple_string
Console.WriteLine(simple.ToKebabCase()); // some-simple-string
Console.WriteLine(simple.ToSpaceCase()); // Some simple string
Console.WriteLine(simple.ToConstantCase()); // SOME_SIMPLE_STRING