CBoosterSharp.Navigation 1.0.0

dotnet add package CBoosterSharp.Navigation --version 1.0.0
                    
NuGet\Install-Package CBoosterSharp.Navigation -Version 1.0.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="CBoosterSharp.Navigation" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CBoosterSharp.Navigation" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="CBoosterSharp.Navigation" />
                    
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 CBoosterSharp.Navigation --version 1.0.0
                    
#r "nuget: CBoosterSharp.Navigation, 1.0.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 CBoosterSharp.Navigation@1.0.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=CBoosterSharp.Navigation&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=CBoosterSharp.Navigation&version=1.0.0
                    
Install as a Cake Tool

CSharpBooster

CSharpBooster is a compile-time code generation toolkit for .NET applications that eliminates boilerplate around:

  • Use Cases
  • Dependency Injection
  • Service Registration
  • Navigation & Routing
  • Route Parameters
  • Navigation Helpers
  • Clean architecture-friendly

Built with source generators, CSharpBooster produces strongly typed code at compile time with zero runtime reflection.


Installation

Install the required packages:

dotnet add package CBoosterSharp.Generator

Features

Use Case Generation

Generate wrappers, dependency registration, and clean application boundaries directly from interfaces.

Define a Repository

using CBoosterSharp.Generator.Attributes;
using CBoosterSharp.Generator.Model;

[Usecaseable(
    GenerateDI = true,
    GenerateWrapper = true,
    DIScope = DIScope.Singleton
)]
[Injectable(implementation: nameof(AuthRepositoryImpl))]
public interface IAuthRepository
{
    Task<int> Login(
        string email,
        string password,
        CancellationToken cancellationToken = default
    );

    Task Logout();
}

Generated

CSharpBooster automatically generates:

  • Repository wrapper classes
  • Dependency registration code
  • Use case accessors
  • Constructor injection support

No manual service registration required.


Dependency Injection

Register Services

Use the Injectable attribute to register classes automatically.

[Injectable]
public partial class LoaderController : ObservableObject
{
}

Modules

Modules provide a structured way to expose custom dependencies.

[Module]
public class AuthDomainModule
{
    [Provides(DIScope.Singleton)]
    public static FilePathService ProvideFilePathService()
    {
        return new FilePathService();
    }
}

Supported Scopes

DIScope.Singleton
DIScope.Scoped
DIScope.Transient

Dependency Entry Point

Generate a single application entry point for all dependencies.

[DIEntryPoint(name: "PlayGroundDependencies")]
public partial class App : Application
{
}

Generated:

PlayGroundDependencies.InstallDependencies();

Usage:

protected override void OnStartup(StartupEventArgs e)
{
    base.OnStartup(e);

    PlayGroundDependencies.InstallDependencies();
}

CSharpBooster provides strongly typed navigation generation.

No route strings.

No manual parameter extraction.

No reflection.


Route Modules

Create a route module.

[RouteModule(name: "ProductFeatureRoutes")]
public sealed partial class ProductFeatureRoutes
{
}

Screens

Products Screen

[Route(
    module: "ProductFeatureRoutes",
    path: "/products",
    scope: NavigationScope.App,
    Tag = "Products",
    GenerateNavigationHelpers = true
)]
public partial class ProductsScreen : Page
{
}

Product Details Screen

[Route(
    module: "ProductFeatureRoutes",
    path: "/products/detail",
    scope: NavigationScope.App,
    Tag = "Product Details",
    GenerateNavigationHelpers = true
)]
public partial class ProductDetailScreen : Page
{
    [RouteParameter]
    public required Product Product { get; init; }
}

Route Parameters

Parameters are strongly typed.

[RouteParameter]
public required Product Product { get; init; }

Generated navigation APIs automatically enforce parameter requirements.


Route Registration

Generate a centralized route registry.

[RouteEntryPoint(name: "PlayGroundRoutes")]
public partial class App : Application
{
}

Generated:

PlayGroundRoutes.RegisterRoutes();

Usage:

protected override void OnStartup(StartupEventArgs e)
{
    base.OnStartup(e);

    PlayGroundRoutes.RegisterRoutes();
}

Generated Navigation Helpers

Navigate without route strings.

Router.Current.NavigateToProductsScreen();

Navigate with parameters:

Router.Current.NavigateToProductDetailScreen(
    product,
    onNavigating: (string tag) =>
    {
        MessageBox.Show(
            $"Navigating to product detail screen for {product.Name}");
    });

Application Setup

[DIEntryPoint(name: "PlayGroundDependencies")]
[RouteEntryPoint(name: "PlayGroundRoutes")]
public partial class App : Application
{
    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);

        PlayGroundDependencies.InstallDependencies();
        PlayGroundRoutes.RegisterRoutes();
    }
}

Why CSharpBooster?

Less Boilerplate

No manual service registration.

Strongly Typed Navigation

No route strings.

Compile-Time Safety

Errors are caught during build.

Source Generated

No runtime reflection.

MVVM Friendly

Works naturally with modern .NET architectures.

Scalable

Designed for small projects and enterprise applications alike.


License

Licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0-windows7.0

    • No dependencies.

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
1.0.0 83 6/7/2026