Skip to content

Commit 1dbf135

Browse files
committed
Bump version to 2.7.0 and add release notes
1 parent 1b3bbd2 commit 1dbf135

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ GlobalConfiguration.Configuration.UseAutofacActivator(builder.Build());
2828

2929
After invoking the `UseAutofacActivator` method, Autofac-based implementation of the `JobActivator` class will be used to resolve job type instances during the background job processing.
3030

31+
### Custom Scope Configuration
32+
33+
Starting from version 2.7.0 it is possible to define a custom scope configuration action and pass background job-related data to the service registration logic, like identifier, parameters and so on.
34+
35+
```csharp
36+
GlobalConfiguration.Configuration.UseAutofacActivator(builder.Build(), (builder, context) =>
37+
{
38+
var tenantId = context.GetJobParameter<string>("TenantId", allowStale: true);
39+
builder.Register<MultiTenantDatabase>(provider => new MultiTenantDatabase(tenantId));
40+
});
41+
```
42+
3143
### Shared Components
3244

3345
Sometimes it is required to share the same service instance for different components, such as database connection, unit of work, etc. *Hangfire.Autofac* allows you to share them in a scope, limited to the **current** background job processing, just call the `InstancePerBackgroundJob` method in your component registration logic:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#---------------------------------#
1212

1313
# Please don't edit it manually, use the `build.bat version` command instead.
14-
version: 2.6.0-build-0{build}
14+
version: 2.7.0-build-0{build}
1515

1616
image: Visual Studio 2022
1717

nuspecs/Hangfire.Autofac.nuspec

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
<copyright>© 2014-2025 Hangfire OÜ</copyright>
1515
<tags>Hangfire Autofac IoC Integration</tags>
1616
<readme>README.md</readme>
17-
<releaseNotes>https://github.com/HangfireIO/Hangfire.Autofac/releases
17+
<releaseNotes><![CDATA[https://github.com/HangfireIO/Hangfire.Autofac/releases
18+
2.7.0
19+
* Added – Support for custom scope configuration logic with background job context data.
20+
* Project – Faster continuous integration builds with the modern Powershell.
21+
* Project – Don't emit warnings when building with .NET 9.0 SDK.
22+
1823
2.6.0
1924
* Project – Sign NuGet package and .NET assemblies on build.
2025
* Project – Enable NuGet package signature validation on restore.
@@ -52,7 +57,7 @@
5257
5358
2.0.1
5459
* Changed – `AutofacJobActivator.LifetimeScopeTag` field is now public.
55-
</releaseNotes>
60+
]]></releaseNotes>
5661
<dependencies>
5762
<group targetFramework="net45">
5863
<dependency id="Autofac" version="3.0.0" />

src/SharedAssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
[assembly: ComVisible(false)]
1111

1212
// Please don't edit it manually, use the `build.bat version` command instead.
13-
[assembly: AssemblyVersion("2.6.0")]
13+
[assembly: AssemblyVersion("2.7.0")]

0 commit comments

Comments
 (0)