Autofac.Extras.AggregateService
7.0.0
Prefix Reserved
dotnet add package Autofac.Extras.AggregateService --version 7.0.0
NuGet\Install-Package Autofac.Extras.AggregateService -Version 7.0.0
<PackageReference Include="Autofac.Extras.AggregateService" Version="7.0.0" />
<PackageVersion Include="Autofac.Extras.AggregateService" Version="7.0.0" />
<PackageReference Include="Autofac.Extras.AggregateService" />
paket add Autofac.Extras.AggregateService --version 7.0.0
#r "nuget: Autofac.Extras.AggregateService, 7.0.0"
#:package Autofac.Extras.AggregateService@7.0.0
#addin nuget:?package=Autofac.Extras.AggregateService&version=7.0.0
#tool nuget:?package=Autofac.Extras.AggregateService&version=7.0.0
Autofac.Extras.AggregateService
Dynamic aggregate service implementation generation for Autofac via Castle DynamicProxy.
Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.
Quick Start
Once you've added a reference to the Autofac.Extras.AggregateService package, you can start by creating your aggregate service interface. The idea is that, instead of injecting several individual services into a consumer, you have a single aggregate that gets injected, where each property is one of the dependencies:
public interface IMyAggregateService
{
IFirstService FirstService { get; }
ISecondService SecondService { get; }
}
Update your consumer to take in the aggregate:
public class SomeController
{
private readonly IMyAggregateService _aggregateService;
public SomeController(IMyAggregateService aggregateService)
{
_aggregateService = aggregateService;
}
}
Finally, make sure you register the individual dependencies, the aggregate service interface, and your consumer.
var builder = new ContainerBuilder();
builder.RegisterAggregateService<IMyAggregateService>();
builder.Register(/*...*/).As<IFirstService>();
builder.Register(/*...*/).As<ISecondService>();
builder.RegisterType<SomeController>();
var container = builder.Build();
When you resolve the consumer, the aggregate service will be injected and you can use the properties on that. This allows you to add new dependencies to the interface without changing all of your consumers.
Get Help
Need help with Autofac? We have a documentation site as well as API documentation. We're ready to answer your questions on Stack Overflow or check out the discussion forum.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Autofac (>= 9.3.0)
- Castle.Core (>= 5.2.1)
-
.NETStandard 2.1
- Autofac (>= 9.3.0)
- Castle.Core (>= 5.2.1)
-
net10.0
- Autofac (>= 9.3.0)
- Castle.Core (>= 5.2.1)
-
net8.0
- Autofac (>= 9.3.0)
- Castle.Core (>= 5.2.1)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Autofac.Extras.AggregateService:
| Package | Downloads |
|---|---|
|
Cogito.Autofac
Provides various autofac utilities, and a new unique attribute registration system. |
|
|
Jabberwocky.Autofac
Jabberwocky Autofac |
|
|
Kleu.Utility.Web
Web stack with OWIN, WebApi, SignalR, Autofac, AutoMapper, various utilities and configuration defaults to speed up initial setup efforts |
|
|
Newbe.Claptrap.Orleans
Newbe.Claptrap is a framework for server development. It take advantage to Actor Pattern and Event Sourcing Pattern. It could help you to build a distributed, scalable, and testable server application. This package is one part of that project. Please check the source repository for more details. https://github.com/newbe36524/Newbe.Claptrap |
|
|
Newbe.Claptrap.Dapr
Newbe.Claptrap is a framework for server development. It take advantage to Actor Pattern and Event Sourcing Pattern. It could help you to build a distributed, scalable, and testable server application. This package is one part of that project. Please check the source repository for more details. Docs: https://claptrap.newbe.pro Github: https://github.com/newbe36524/Newbe.Claptrap Gitee: https://gitee.com/yks/Newbe.Claptrap |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Autofac.Extras.AggregateService:
| Repository | Stars |
|---|---|
|
recyclarr/recyclarr
Automatically sync TRaSH Guides to your Sonarr and Radarr instances
|
|
|
newbe36524/Newbe.Claptrap
This is a frameworks with reactive, event sourcing and Actor pattern as basic theories. On top of this, developers can create "distributed", "scale out", and "easy to test" application more simply. Claptrap and it`s Minions is on the way.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 7.0.0 | 38 | 6/21/2026 |
| 6.1.2 | 1,441,455 | 1/18/2022 |
| 6.1.1 | 254,802 | 8/25/2021 |
| 6.1.0 | 1,235 | 8/24/2021 |
| 6.0.0 | 287,347 | 10/5/2020 |
| 5.0.0 | 383,311 | 1/31/2020 |
| 4.1.0 | 765,325 | 1/26/2017 |
| 4.0.0 | 399,350 | 11/4/2015 |
| 3.0.4 | 248,683 | 3/27/2014 |
| 3.0.3 | 3,411 | 12/17/2013 |
| 3.0.2 | 9,937 | 4/9/2013 |
| 3.0.1 | 2,458 | 4/8/2013 |
| 3.0.0 | 3,239 | 1/30/2013 |
| 3.0.0-beta2 | 1,887 | 12/23/2012 |
| 3.0.0-beta | 2,084 | 11/1/2012 |
Release notes are at https://github.com/autofac/Autofac.Extras.AggregateService/releases