Modulight.Modules.CommandLine

Basic types for command line modules in Modulight modular framework.


Keywords
command-line, modular, graphql, dotnet, lazy-loading, modular-framework, blazor, razor-components, blazor-server, blazor-webassembly
License
MPL-2.0
Install
Install-Package Modulight.Modules.CommandLine -Version 0.0.7-preview.8

Documentation

Modulight

Modulight is a light modular framework aimed to be low intrusive based on dependency injection for .NET 5, ASP.NET Core and Blazor.

Features

  • Dependency injection
  • Unified services registering
  • CommandLine (cooperated with CliFx)
    • Hosting in generic host Microsoft.Extensions.Hosting.IHost
    • Dependency injection, logging & hosting services
    • Extensible & Composable
  • Blazor Client & Server
    • Unified CSS & JS lazy loading & prerendering. No need to append <script> and <link> repeatedly for every razor components, especially when use different hosting models.
    • Unified assembly lazy loading.
    • Interop between modules and host.
    • A builtin hosting implementation with prerendering.
  • ASP.NET Server
    • Custom middlewares
    • Custom endpoints
  • GraphQL Server (cooperated with ChilliCream GraphQL Platform)
    • Unified query/mutation/subscription definition
  • Builtin module dependencies, options & services support

Usage

Use modules

See here for details.

Addition steps

Use Command line modules

See here for details.

Use Razor component modules

See here for details.

Use Blazor UI hosting template

See here for details.

Use ASP.NET modules

See here for details.

Use GraphQL modules

See here for details.

Example codes

They are based on nightly build package at:

NUGET source

Design and use a command line module in console application

Design a client (Blazor) module

  • HelloModule.cs Client module definition.
  • Index.razor Client module pages. It belongs to a different assembly from which Module belongs to because we want this assembly is lazy loading.

Design a GraphQL server module

Use a client module in Blazor websites

Use a GraphQL server module

Project guide