Skip to content

Commit fbfc04a

Browse files
committed
bit of cleanup on readme
1 parent 37a2f19 commit fbfc04a

File tree

1 file changed

+32
-27
lines changed

1 file changed

+32
-27
lines changed

README.md

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,50 @@
1-
# ResultR
1+
# 🎯 ResultR
2+
3+
[![GitHub Release](https://img.shields.io/github/v/release/AlanBarber/ResultR)](https://github.com/AlanBarber/ResultR/releases)
4+
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/alanbarber/ResultR/release.yml)](https://github.com/AlanBarber/ResultR/actions/workflows/release.yml)
5+
[![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/alanbarber/ResultR/total)](https://github.com/AlanBarber/ResultR/releases)
6+
[![GitHub License](https://img.shields.io/github/license/alanbarber/ResultR)](https://github.com/AlanBarber/ResultR/blob/main/LICENSE)
27

38
A lightweight, opinionated C# mediator library focused on simplicity and clean design.
49

5-
## Overview
10+
## 📖 Overview
611

712
ResultR provides a minimal yet powerful mediator pattern implementation with built-in result handling, validation, and request lifecycle hooks. It's designed as a modern alternative to MediatR with a smaller surface area and a clearer result pattern.
813

9-
## Key Features
14+
## Key Features
1015

11-
- **Single Interface Pattern**: Uses only `IRequest<TResponse>` and `IRequestHandler<TRequest, TResponse>` - no distinction between commands and queries
12-
- **Unified Result Type**: All operations return `Result<T>` or `Result`, supporting success/failure states, exception capture, and optional metadata
13-
- **Optional Inline Hooks**: Handlers can override `ValidateAsync()`, `OnPreHandleAsync()`, and `OnPostHandleAsync()` methods without requiring base classes or separate interfaces
14-
- **Request-Specific Logging**: Built-in support for per-request logging via `ILoggerFactory`
15-
- **Minimal Configuration**: Simple DI integration with minimal setup
16-
- **Strong Typing**: Full type safety throughout the pipeline
16+
- 🔌 **Single Interface Pattern**: Uses only `IRequest<TResponse>` and `IRequestHandler<TRequest, TResponse>` - no distinction between commands and queries
17+
- 📦 **Unified Result Type**: All operations return `Result<T>` or `Result`, supporting success/failure states, exception capture, and optional metadata
18+
- 🪝 **Optional Inline Hooks**: Handlers can override `ValidateAsync()`, `OnPreHandleAsync()`, and `OnPostHandleAsync()` methods without requiring base classes or separate interfaces
19+
- 📝 **Request-Specific Logging**: Built-in support for per-request logging via `ILoggerFactory`
20+
- **Minimal Configuration**: Simple DI integration with minimal setup
21+
- 🔒 **Strong Typing**: Full type safety throughout the pipeline
1722

18-
## Design Philosophy
23+
## 💡 Design Philosophy
1924

2025
ResultR prioritizes:
2126
- **Simplicity over flexibility**: Opinionated design choices reduce boilerplate
2227
- **Clean architecture**: No magic strings, reflection-heavy operations, or hidden behaviors
2328
- **Explicit over implicit**: Clear pipeline execution with predictable behavior
2429
- **Modern C# practices**: Leverages latest language features and patterns
2530

26-
## Pipeline Execution
31+
## 🔄 Pipeline Execution
2732

2833
Each request flows through a simple, predictable pipeline:
2934

30-
1. **Validation** - Calls `ValidateAsync()` if overridden, short-circuits on failure
31-
2. **Pre-Handle** - Invokes `OnPreHandleAsync()` for optional logging or setup
32-
3. **Handle** - Executes the core `HandleAsync()` logic
33-
4. **Post-Handle** - Invokes `OnPostHandleAsync()` for logging or cleanup
34-
5. **Exception Handling** - Any exceptions are caught and returned as `Result.Failure` with the exception attached
35+
1. **Validation** - Calls `ValidateAsync()` if overridden, short-circuits on failure
36+
2. 🚀 **Pre-Handle** - Invokes `OnPreHandleAsync()` for optional logging or setup
37+
3. ⚙️ **Handle** - Executes the core `HandleAsync()` logic
38+
4. 🏁 **Post-Handle** - Invokes `OnPostHandleAsync()` for logging or cleanup
39+
5. 🛡️ **Exception Handling** - Any exceptions are caught and returned as `Result.Failure` with the exception attached
3540

36-
## Installation
41+
## 📥 Installation
3742

3843
```bash
3944
dotnet add package ResultR
4045
```
4146

42-
## Quick Start
47+
## 🚀 Quick Start
4348

4449
### 1. Define a Request
4550

@@ -137,7 +142,7 @@ public class UserController : ControllerBase
137142
}
138143
```
139144

140-
## Result Type
145+
## 📦 Result Type
141146

142147
The `Result<T>` type provides a clean way to handle success and failure states:
143148

@@ -175,7 +180,7 @@ public async ValueTask<Result<Result>> HandleAsync(DeleteUserRequest request, Ca
175180
}
176181
```
177182

178-
## Advanced Features
183+
## 🔧 Advanced Features
179184

180185
### Metadata Support
181186

@@ -204,7 +209,7 @@ public class ValidatingHandler : IRequestHandler<MyRequest, MyResponse>
204209
}
205210
```
206211

207-
## Benchmarks
212+
## 📊 Benchmarks
208213

209214
There are many great Mediator implementations out there. Here is a comparision between ResultR and some of the other popular ones:
210215

@@ -233,7 +238,7 @@ cd src/ResultR.Benchmarks
233238
dotnet run -c Release
234239
```
235240

236-
## Why ResultR?
241+
## 🤔 Why ResultR?
237242

238243
### vs MediatR
239244

@@ -249,20 +254,20 @@ dotnet run -c Release
249254
- **Type safety**: Compile-time guarantees for request/response matching
250255
- **Extensibility**: Optional hooks without forcing inheritance
251256

252-
## Requirements
257+
## 📋 Requirements
253258

254259
- .NET 10.0 or later
255260
- C# 14.0 or later
256261

257-
## Contributing
262+
## 🤝 Contributing
258263

259264
Contributions are welcome! Please feel free to submit a Pull Request.
260265

261-
## License
266+
## 📄 License
262267

263268
ISC License - see LICENSE file for details
264269

265-
## Roadmap
270+
## 🗺️ Roadmap
266271

267272
- [x] Core mediator implementation
268273
- [x] Result types with metadata support
@@ -271,7 +276,7 @@ ISC License - see LICENSE file for details
271276
- [x] Performance benchmarks
272277
- [x] NuGet package publication
273278

274-
## Support
279+
## 💬 Support
275280

276281
- **Issues**: [GitHub Issues](https://github.com/AlanBarber/ResultR/issues)
277282

0 commit comments

Comments
 (0)