NScatterGather 0.4.0

Simple, unambitious implementation of the Scatter-Gather pattern in .NET.

Install-Package NScatterGather -Version 0.4.0
dotnet add package NScatterGather --version 0.4.0
<PackageReference Include="NScatterGather" Version="0.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NScatterGather --version 0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NScatterGather, 0.4.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install NScatterGather as a Cake Addin
#addin nuget:?package=NScatterGather&version=0.4.0

// Install NScatterGather as a Cake Tool
#tool nuget:?package=NScatterGather&version=0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
// Use a RecipientsCollection to register the eligible recipients:
var collection = new RecipientsCollection();
collection.Add<Foo>(); // type
collection.Add(new Bar()); // instance
collection.Add((int n) => n.ToString()); // delegate

// Use an Aggregator for sending the requests to all the available
// recipients that can support the desired request/response types,
// and for aggregating the results:
var aggregator = new Aggregator(collection);

// Send a request to all the recipients
// capable of accepting and int.
// The results are then combined in the response:
AggregatedResponse<object> objects = await aggregator.Send(42);

// The following overload can be used when
// the return type is either known or binding.
// Only the recipients that accept an int and
// return a string will be invoked:
AggregatedResponse<string> strings = await aggregator.Send<string>(42);
// Use a RecipientsCollection to register the eligible recipients:
var collection = new RecipientsCollection();
collection.Add<Foo>(); // type
collection.Add(new Bar()); // instance
collection.Add((int n) => n.ToString()); // delegate

// Use an Aggregator for sending the requests to all the available
// recipients that can support the desired request/response types,
// and for aggregating the results:
var aggregator = new Aggregator(collection);

// Send a request to all the recipients
// capable of accepting and int.
// The results are then combined in the response:
AggregatedResponse<object> objects = await aggregator.Send(42);

// The following overload can be used when
// the return type is either known or binding.
// Only the recipients that accept an int and
// return a string will be invoked:
AggregatedResponse<string> strings = await aggregator.Send<string>(42);

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.4.0 73 1/6/2021
0.3.0 106 12/10/2020
0.2.0 140 12/1/2020
0.1.0 191 10/5/2020