Osirion.Blazor.Cms.Application
4.2.0
Prefix Reserved
dotnet add package Osirion.Blazor.Cms.Application --version 4.2.0
NuGet\Install-Package Osirion.Blazor.Cms.Application -Version 4.2.0
<PackageReference Include="Osirion.Blazor.Cms.Application" Version="4.2.0" />
<PackageVersion Include="Osirion.Blazor.Cms.Application" Version="4.2.0" />
<PackageReference Include="Osirion.Blazor.Cms.Application" />
paket add Osirion.Blazor.Cms.Application --version 4.2.0
#r "nuget: Osirion.Blazor.Cms.Application, 4.2.0"
#:package Osirion.Blazor.Cms.Application@4.2.0
#addin nuget:?package=Osirion.Blazor.Cms.Application&version=4.2.0
#tool nuget:?package=Osirion.Blazor.Cms.Application&version=4.2.0
Osirion.Blazor.Cms.Application
Application layer for the Osirion.Blazor CMS ecosystem, implementing core business logic, use cases, and application services.
Overview
The Application project represents the application layer in the Clean Architecture pattern, bridging the domain models with the infrastructure and presentation layers. It uses a command/query split: commands and queries are plain classes, each handled by one handler, and two dispatchers resolve the handler from the service provider. This package ships handlers for the content commands, for GetContentByIdQuery, GetContentByPathQuery, SearchContentQuery, GetDirectoryByPathQuery and GetDirectoryTreeQuery; the other commands and queries need a handler registered by the host. Input is validated with FluentValidation before a command runs.
Components
Commands
A command implements ICommand and is handled by an ICommandHandler<TCommand> (namespace Osirion.Blazor.Cms.Application.Commands):
public interface ICommandHandler<in TCommand> where TCommand : ICommand
{
Task HandleAsync(TCommand command, CancellationToken cancellationToken = default);
}
Content commands (Osirion.Blazor.Cms.Application.Commands.Content) are CreateContentCommand, UpdateContentCommand and DeleteContentCommand. Directory commands (Osirion.Blazor.Cms.Application.Commands.Directory) are CreateDirectoryCommand, UpdateDirectoryCommand, MoveDirectoryCommand and DeleteDirectoryCommand.
await commandDispatcher.DispatchAsync(new CreateContentCommand
{
Title = "Hello",
Content = "# Hello",
Path = "blog/hello.md",
CommitMessage = "Add hello post"
});
ICommandDispatcher.DispatchAsync<TCommand>(command, cancellationToken) is implemented by ValidatingCommandDispatcher. It runs the registered validator, if there is one, and throws ContentValidationException when validation fails.
Queries
A query implements IQuery<TResult> and is handled by an IQueryHandler<TQuery, TResult> (namespace Osirion.Blazor.Cms.Application.Queries):
public interface IQueryHandler<in TQuery, TResult> where TQuery : IQuery<TResult>
{
Task<TResult> HandleAsync(TQuery query, CancellationToken cancellationToken = default);
}
Content queries (Osirion.Blazor.Cms.Application.Queries.Content) include GetContentByPathQuery, GetContentByIdQuery, GetContentByUrlQuery, GetAllContentQuery, SearchContentQuery, GetContentCategoriesQuery and GetContentTagsQuery. Directory queries (Osirion.Blazor.Cms.Application.Queries.Directory) are GetDirectoryByIdQuery, GetDirectoryByPathQuery and GetDirectoryTreeQuery.
var item = await queryDispatcher.DispatchAsync<GetContentByPathQuery, ContentItem?>(
new GetContentByPathQuery { Path = "blog/hello.md" });
Validators
Input validation uses FluentValidation. CreateContentCommandValidator and UpdateContentCommandValidator (namespace Osirion.Blazor.Cms.Application.Validation.Content) are AbstractValidator<T> classes, for example:
public class CreateContentCommandValidator : AbstractValidator<CreateContentCommand>
{
public CreateContentCommandValidator()
{
RuleFor(x => x.Title)
.NotEmpty().WithMessage("Title is required")
.MaximumLength(200).WithMessage("Title cannot exceed 200 characters");
// Further rules for Content, Path and Slug
}
}
FluentValidationAdapter<T> exposes a FluentValidation validator through the application's own IValidator<T>.
Registration
This package does not register its services. AddOsirionCqrs() in the Osirion.Blazor.Cms.Infrastructure package (namespace Osirion.Blazor.Cms.Infrastructure.DependencyInjection) registers the dispatchers, the command and query handlers, the validators and their adapters.
Dependencies
The application layer has the following dependencies:
- Osirion.Blazor.Cms.Domain: For domain entities and interfaces
- FluentValidation: For input validation
- Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Logging.Abstractions: For service resolution and logging
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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 is compatible. 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. |
-
net10.0
- FluentValidation (>= 12.2.0)
- Markdig (>= 1.4.1)
- Microsoft.Extensions.DependencyInjection (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Osirion.Blazor.Cms.Domain (>= 4.2.0)
- YamlDotNet (>= 18.1.0)
-
net9.0
- FluentValidation (>= 12.2.0)
- Markdig (>= 1.4.1)
- Microsoft.Extensions.DependencyInjection (>= 9.0.21)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.21)
- Osirion.Blazor.Cms.Domain (>= 4.2.0)
- YamlDotNet (>= 18.1.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Osirion.Blazor.Cms.Application:
| Package | Downloads |
|---|---|
|
Osirion.Blazor.Cms.Infrastructure
Infrastructure layer for the Osirion.Blazor CMS ecosystem, implementing repositories, external service integrations, and infrastructure concerns. |
|
|
Osirion.Blazor.Cms.Core
Core CMS module for Osirion.Blazor - Provides cms management with provider pattern. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.2.0 | 241 | 10/18/2026 |
| 4.1.0 | 244 | 10/17/2026 |
| 4.0.0 | 161 | 10/12/2026 |
| 3.0.1 | 273 | 9/24/2026 |
| 3.0.0 | 222 | 8/5/2026 |
| 2.1.18 | 336 | 12/14/2025 |
| 2.1.17 | 299 | 12/14/2025 |
| 2.1.16 | 320 | 12/14/2025 |
| 2.1.15 | 290 | 12/12/2025 |
| 2.1.14 | 568 | 12/11/2025 |
| 2.1.13 | 577 | 12/11/2025 |
| 2.1.12 | 367 | 9/4/2025 |
| 2.1.11 | 325 | 8/31/2025 |
| 2.1.10 | 370 | 8/29/2025 |
| 2.1.9 | 381 | 8/29/2025 |
| 2.1.8 | 381 | 8/27/2025 |
| 2.1.7 | 481 | 8/25/2025 |
| 2.1.6 | 275 | 8/23/2025 |
| 2.1.5 | 342 | 6/24/2025 |
| 2.1.4 | 346 | 6/18/2025 |