From 91ad14cc0f12dd473f0452f46fc24e098d47b99c Mon Sep 17 00:00:00 2001 From: Tommaso Bertoni Date: Fri, 11 Dec 2020 12:34:25 +0100 Subject: [PATCH] Adds codefactor badge. --- README.md | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 7b5053b..b7a12e0 100644 --- a/README.md +++ b/README.md @@ -11,20 +11,25 @@ + + +

+ +

- - + +

Table of Contents [Intro](#Intro)
- [When to use](#When-to-use)
[How to use](#How-to-use)
+ [When to use](#When-to-use)
[Special cases](#Special-cases)
[Samples](#Samples)
@@ -37,24 +42,6 @@ The Scatter-Gather pattern: send a request to multiple recipients, and aggregate This pattern helps to limit the coupling between the consumer and the recipients in integration scenarios, and provides standard error-handling and timeout capabilities. -# When to use - -## Competing Tasks - -The recipients compete in order to provide the best, or the fastest, response to the request. The consumer will then pick the best value from the aggregated response. - -[sample:](samples/NScatterGather.Samples.CompetingTasks/) get an item's best price from a collection of suppliers: - -![competing-tasks-diagram](assets/images/competing-tasks-diagram.png) - -## Task parallelization - -Different operations are computed concurrently, and their results combined or used together. The result types could be different. - -[sample:](samples/NScatterGather.Samples.TaskParallelization/) get a user's data from different services, and then compose into a model: - -![tasks-parallelization-diagram](assets/images/task-parallelization-diagram.png) - # How to use Use a `RecipientsCollection` to register the eligible recipients: ```csharp @@ -113,6 +100,24 @@ class Bar _ = await aggregator.Send(42); ``` +# When to use + +## Competing Tasks + +The recipients compete in order to provide the best, or the fastest, response to the request. The consumer will then pick the best value from the aggregated response. + +[sample:](samples/NScatterGather.Samples.CompetingTasks/) get an item's best price from a collection of suppliers: + +![competing-tasks-diagram](assets/images/competing-tasks-diagram.png) + +## Task parallelization + +Different operations are computed concurrently, and their results combined or used together. The result types could be different. + +[sample:](samples/NScatterGather.Samples.TaskParallelization/) get a user's data from different services, and then compose into a model: + +![tasks-parallelization-diagram](assets/images/task-parallelization-diagram.png) + # Special cases ## Handling async methods @@ -236,3 +241,4 @@ For more, take a look at the [samples project in solution](samples/NScatterGathe [![xUnit](https://img.shields.io/badge/using-xUnit-512bd4)](https://xunit.net/) [![coverlet](https://img.shields.io/badge/using-coverlet-512bd4)](https://github.com/coverlet-coverage/coverlet) [![coveralls.io](https://img.shields.io/badge/using-coveralls.io-c05547)](https://coveralls.io/) +[![codefactor.io](https://img.shields.io/badge/using-codefactor.io-35bd97)](https://www.codefactor.io/)