Fafp.ResultPattern
1.0.0
dotnet add package Fafp.ResultPattern --version 1.0.0
NuGet\Install-Package Fafp.ResultPattern -Version 1.0.0
<PackageReference Include="Fafp.ResultPattern" Version="1.0.0" />
<PackageVersion Include="Fafp.ResultPattern" Version="1.0.0" />
<PackageReference Include="Fafp.ResultPattern" />
paket add Fafp.ResultPattern --version 1.0.0
#r "nuget: Fafp.ResultPattern, 1.0.0"
#:package Fafp.ResultPattern@1.0.0
#addin nuget:?package=Fafp.ResultPattern&version=1.0.0
#tool nuget:?package=Fafp.ResultPattern&version=1.0.0
Русская версия | English
Faf.Shared.ResultPattern
Result Pattern library for type-safe error handling without exceptions. Part of the Firefly AI Flow Platform.
GitHub: Kotrecon/faf.result-pattern
Components
Core (Faf.ResultPattern.Common)
Result— Operation result without a return valueResult<T>— Operation result with a return valueIError— Business error interfaceValidationError,NotFoundError,ConflictError,ForbiddenError,BusinessRuleError
Web Adapter (Faf.ResultPattern.Web)
ResultExtensions—.ToActionResult()extension for mapping Result → IActionResult
Installation
dotnet add package Faf.ResultPattern
Usage
using Faf.ResultPattern.Common;
using Faf.ResultPattern.Web;
public Result<User> GetUser(Guid id)
{
if (id == Guid.Empty)
return Result<User>.Failure(new ValidationError("Invalid ID"));
var user = _repository.GetById(id);
if (user == null)
return Result<User>.Failure(new NotFoundError("User", id.ToString()));
return Result<User>.Success(user);
}
// In the controller
var result = _service.GetUser(id);
return result.ToActionResult();
Documentation
Full documentation: result-pattern.md
Roadmap
✅ v1.0.0 — Core + Web Adapter
🔄 v1.1.0 — Async validation
📋 v1.2.0 — Localization
📋 v1.3.0 — Advanced error types
Author
@Kotrecon
Solution Architect from Saint Petersburg. Specialization: .NET, C#, JS, Python, AI/ML, RAG, Agents, DevOps, GitHub, GitLab, CI/CD, Industrial Automation, Industrial Software, DB, PostgreSQL.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- 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 | 137 | 7/3/2026 |