All Projects → cocowalla → Hangfire.StructureMap

cocowalla / Hangfire.StructureMap

Licence: Apache-2.0 License
Hangfire background job activator based on the StructureMap IoC container

Programming Languages

C#
18002 projects
Batchfile
5799 projects
shell
77523 projects

Projects that are alternatives of or similar to Hangfire.StructureMap

SwiftInjection
Dependency Injection framework for Swift
Stars: ✭ 21 (+31.25%)
Mutual labels:  ioc, dependency-injection
fusion
A simple automated dependency injection library for TypeScript, supporting React class and functional components.
Stars: ✭ 18 (+12.5%)
Mutual labels:  ioc, dependency-injection
vue3-oop
使用类和依赖注入写vue组件
Stars: ✭ 90 (+462.5%)
Mutual labels:  ioc, dependency-injection
ioc-ts
Inversion of control container on TypeScript
Stars: ✭ 14 (-12.5%)
Mutual labels:  ioc, dependency-injection
alpha-dic
Powerful dependency injection container for node.js
Stars: ✭ 27 (+68.75%)
Mutual labels:  ioc, dependency-injection
Asp.net MVC5 DDD EF6 IoC
Asp.net C# MVC5, EF6, DDD, IoC
Stars: ✭ 14 (-12.5%)
Mutual labels:  ioc, dependency-injection
Zenject-2019
Dependency Injection Framework for Unity3D
Stars: ✭ 2,567 (+15943.75%)
Mutual labels:  ioc, dependency-injection
ashley
Ashley is a dependency injection container for JavaScript.
Stars: ✭ 23 (+43.75%)
Mutual labels:  ioc, dependency-injection
DependencyInjector
Lightweight dependency injector
Stars: ✭ 30 (+87.5%)
Mutual labels:  ioc, dependency-injection
tsdi
Dependency Injection container (IoC) for TypeScript
Stars: ✭ 50 (+212.5%)
Mutual labels:  ioc, dependency-injection
vesselize
⛵ A JavaScript IoC container that works seamlessly with Vue.js and React.
Stars: ✭ 22 (+37.5%)
Mutual labels:  ioc, dependency-injection
vue-ioc
IoC and DI for Vue powered by InversifyJS and inspired by Angular Module syntactic sugar.
Stars: ✭ 39 (+143.75%)
Mutual labels:  ioc, dependency-injection
iocgo
A lightweight Inversion of Control (IoC) (Dependency Injection) container for Golang
Stars: ✭ 36 (+125%)
Mutual labels:  ioc, dependency-injection
Reflex
Minimal dependency injection framework for Unity
Stars: ✭ 263 (+1543.75%)
Mutual labels:  ioc, dependency-injection
tsed
📐 Ts.ED is a Node.js and TypeScript framework on top of Express to write your application with TypeScript (or ES6). It provides a lot of decorators and guideline to make your code more readable and less error-prone.
Stars: ✭ 2,350 (+14587.5%)
Mutual labels:  ioc, dependency-injection
inject
[Archived] See https://github.com/goava/di.
Stars: ✭ 49 (+206.25%)
Mutual labels:  ioc, dependency-injection
waiter
Dependency injection, Inversion of control container for rust with compile time binding.
Stars: ✭ 71 (+343.75%)
Mutual labels:  ioc, dependency-injection
loopback-next
LoopBack makes it easy to build modern API applications that require complex integrations.
Stars: ✭ 4,412 (+27475%)
Mutual labels:  ioc, dependency-injection
di
🛠 A full-featured dependency injection container for go programming language.
Stars: ✭ 156 (+875%)
Mutual labels:  ioc, dependency-injection
redi
💉 A dependency injection library for TypeScript & JavaScript, along with a binding for React.
Stars: ✭ 29 (+81.25%)
Mutual labels:  ioc, dependency-injection

Hangfire.StructureMap

Windows Build Status Linux Build status NuGet

This package provides StructureMap support for Hangfire, allowing nested StructureMap containers to resolve job type instances and their dependencies, and to manage the lifetime of resolved instances.

Getting started

Install the Hangfire.StructureMap package from NuGet:

Install-Package Hangfire.StructureMap

To configure Hangfire to use StructureMap, configure your container and call the IGlobalConfiguration extension method, UseStructureMapActivator:

var container = new Container();
// container.Configure...

GlobalConfiguration.Configuration.UseStructureMapActivator(container);

After configuration, when jobs are started a StructureMap-based implementation of the JobActivator class is used to resolve job type instances and all of their dependencies.

Object Lifecycles

Hangfire.StructureMap doesn't rely on a specific object lifecycle - you can configure your dependencies as Singleton, ContainerScoped, Transient, AlwaysUnique or ThreadLocal as normal.

Hangfire.StructureMap creates a nested container for each job execution, so using ContainerScoped will scope dependency lifetimes to that of the job.

container.For<IRepository>().ContainerScoped().Use<GenericRepository>();

The nested container is disposed when jobs ends, and all dependencies that implement the IDisposable interface are also automatically disposed (Singleton scoped instances are of course an exception).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].