Skip to content

Commit 02f73ca

Browse files
committed
2 parents 22d310b + 8617d0a commit 02f73ca

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

readme.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
12
One More Lib For MediatR
23
========================
4+
[![CI](https://github.com/pascal-libaud/One.More.Lib.For.MediatR/actions/workflows/ci.yml/badge.svg)](https://github.com/pascal-libaud/One.More.Lib.For.MediatR/actions/workflows/ci.yml) [![NuGet](https://img.shields.io/nuget/v/One.More.Lib.For.MediatR.svg)](https://www.nuget.org/packages/One.More.Lib.For.MediatR/)
35

4-
As the name suggests, a new library that extends MediatR with integrated PipelineBehavior :
6+
As the name suggests, a new library that extends MediatR with integrated PipelineBehavior:
57
- Performance Logger
68
- MemoryCache
79
- Validation with FluentValidation
@@ -63,6 +65,14 @@ public class GetUserByName : IRequest<User?>
6365
}
6466
```
6567

68+
Or you can configure more option request by request.
69+
```csharp
70+
[MemoryCache(Absolute)]
71+
public class GetUserByName : IRequest<User?>
72+
{
73+
public string Name { get; set; }
74+
}
75+
```
6676
## Validation with FluentValidation
6777

6878
### How to configure it?
@@ -99,4 +109,21 @@ public class GetUserByName : IRequest<User?>
99109
{
100110
public string Name { get; set; }
101111
}
102-
```
112+
```
113+
Or you can override default values by passing them in the RetryPolicy Attribute
114+
115+
```csharp
116+
[RetryPolicy(OverrideRetryCount = true, RetryCount = 5)]
117+
public class GetUserByName : IRequest<User?>
118+
{
119+
public string Name { get; set; }
120+
}
121+
```
122+
123+
```csharp
124+
[RetryPolicy(OverrideRetryDelay = true, RetryDelay = 200)]
125+
public class GetUserByName : IRequest<User?>
126+
{
127+
public string Name { get; set; }
128+
}
129+
```

0 commit comments

Comments
 (0)