AgileModules.Module
1.0.1
dotnet add package AgileModules.Module --version 1.0.1
NuGet\Install-Package AgileModules.Module -Version 1.0.1
<PackageReference Include="AgileModules.Module" Version="1.0.1" />
<PackageVersion Include="AgileModules.Module" Version="1.0.1" />
<PackageReference Include="AgileModules.Module" />
paket add AgileModules.Module --version 1.0.1
#r "nuget: AgileModules.Module, 1.0.1"
#:package AgileModules.Module@1.0.1
#addin nuget:?package=AgileModules.Module&version=1.0.1
#tool nuget:?package=AgileModules.Module&version=1.0.1
AgileModules.Module
AgileModules.Module is a lightweight and flexible library that helps you develop software modules independently from the underlying technology. It is designed to work with any .NET version, making it ideal for creating modular applications that can easily adapt to any project.
Key Features
- Technology Independence: Create modular components that are reusable across different .NET projects.
- Flexible Integration: Supports integrating modules without direct references between the main application and the modules.
- Seamless Communication: Utilize Mediator patterns, such as MediatR, for communication between the main application and modules.
- Modularity: Design, develop, and deploy each module independently as a package of components like menus, notifications, and workflows.
- Dynamic Integration: Modules can be loaded and registered dynamically into the application, making it easy to scale your solution.
Installation
Install the NuGet package by running the following command in your package manager console:
Install-Package AgileModules.Module
Or use the .NET CLI:
dotnet add package AgileModules.Module
Usage
1. Setting Up Your Module
To create a module, define it by implementing the IModule interface. You can organize your module as a set of components like services, controllers, and workflows.
using AgileModules;
public class ExampleModule : IModule
{
public void Initialize()
{
// Module initialization logic
}
}
2. Dynamic Module Loading
Modules can be dynamically loaded into your application without the need for direct references. This allows you to plug in modules as needed, keeping your codebase clean and maintainable.
3. Communication Between Modules
For communication between modules and the main application, you can use a mediator pattern such as MediatR. This keeps the components decoupled and allows for easy extension of functionality.
Example:
public class ExampleModuleRequest : IRequest<string>
{
public string Data { get; set; }
}
public class ExampleModuleHandler : IRequestHandler<ExampleModuleRequest, string>
{
public Task<string> Handle(ExampleModuleRequest request, CancellationToken cancellationToken)
{
return Task.FromResult($"Processed: {request.Data}");
}
}
4. Module Registration
You can register your modules at startup using the ModuleLoader:
public void ConfigureServices(IServiceCollection services)
{
services.AddModules(); // Automatically discover and register modules
}
5. Modular Menu and Notification Systems
Use AgileModules.Module to create common components like menus and notifications that can be shared across different systems:
public class MenuModule : IModule
{
public void Initialize()
{
// Setup menu and navigation
}
}
| Product | Versions 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. |
-
net8.0
- Handlebars.Net (>= 2.1.6)
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 |
|---|