Modulight.Modules.Core 0.0.7

Core types in Modulight modular framework.

Install-Package Modulight.Modules.Core -Version 0.0.7
dotnet add package Modulight.Modules.Core --version 0.0.7
<PackageReference Include="Modulight.Modules.Core" Version="0.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Modulight.Modules.Core --version 0.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Modulight.Modules.Core, 0.0.7"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Modulight.Modules.Core as a Cake Addin
#addin nuget:?package=Modulight.Modules.Core&version=0.0.7

// Install Modulight.Modules.Core as a Cake Tool
#tool nuget:?package=Modulight.Modules.Core&version=0.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Modulight.Modules.Core

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

Use modules

  1. Register modules.

For general modules:

services.AddModules(builder => {
    builder.AddModule<FooModule>();
});
  1. Configure the module initilizing & shutdown.
var host = services.GetModuleHost();
await host.Initialize();

// do something

await host.Shutdown();

// Or use context:

// context: IServiceProvider services (provided by package Modulight.Modules.Core)
await using var _ = await services.UseModuleHost();

// do something

Or use extension methods for hosting:

// Generic hosting. (provided by package Modulight.Modules.Hosting)
// in Program: Task Main(string[] args)
await CreateHostBuilder(args).Build().RunAsyncWithModules();

// WebAssembly hosting. (provided by package Modulight.Modules.Client.RazorComponents)
// in Program: Task Main(string[] args)
await builder.Build().RunAsyncWithModules();

Modulight.Modules.Core

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

Use modules

  1. Register modules.

For general modules:

services.AddModules(builder => {
    builder.AddModule<FooModule>();
});
  1. Configure the module initilizing & shutdown.
var host = services.GetModuleHost();
await host.Initialize();

// do something

await host.Shutdown();

// Or use context:

// context: IServiceProvider services (provided by package Modulight.Modules.Core)
await using var _ = await services.UseModuleHost();

// do something

Or use extension methods for hosting:

// Generic hosting. (provided by package Modulight.Modules.Hosting)
// in Program: Task Main(string[] args)
await CreateHostBuilder(args).Build().RunAsyncWithModules();

// WebAssembly hosting. (provided by package Modulight.Modules.Client.RazorComponents)
// in Program: Task Main(string[] args)
await builder.Build().RunAsyncWithModules();

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Modulight.Modules.Core:

Package Downloads
Modulight.Modules.Client.RazorComponents
Basic types for razor component client modules in Modulight modular framework.
Modulight.Modules.Server.AspNet
Basic types for AspNet server modules in Modulight modular framework.
Modulight.Modules.Server.GraphQL
Basic types for GraphQL server modules in Modulight modular framework.
Modulight.Modules.CommandLine
Basic types for command line modules in Modulight modular framework.
Modulight.Modules.Hosting
Hosting for Modulight modular framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.0.7 497 5/31/2021
0.0.7-preview.8 150 5/30/2021
0.0.6 213 5/30/2021
0.0.5 236 4/3/2021
0.0.5-preview.18 51 3/14/2021
0.0.5-preview.13 146 3/12/2021
0.0.5-preview.12 47 3/12/2021
0.0.5-preview.11 60 3/10/2021
0.0.5-preview.10 78 3/10/2021
0.0.5-preview.4 69 3/4/2021
0.0.5-preview.2 92 3/4/2021
0.0.4 320 3/4/2021
0.0.4-preview.40 79 2/22/2021
0.0.4-preview.30 112 2/21/2021
0.0.4-preview.28 81 2/20/2021
0.0.4-preview.25 108 2/20/2021
0.0.4-preview.6 85 2/6/2021
0.0.3 101 2/5/2021
0.0.3-preview.39 67 2/3/2021
0.0.3-preview.38 58 2/1/2021
0.0.3-preview.37 73 1/31/2021
0.0.2 76 1/29/2021
0.0.2-preview.36 122 1/17/2021
0.0.2-preview.34 85 1/16/2021
0.0.1-preview.30 77 1/13/2021
0.0.1-preview.29 96 1/13/2021
0.0.1-preview.28 61 1/12/2021
0.0.1-preview.25 70 1/11/2021