{"action":"created","issue":{"url":"https://api.github.com/repos/HangfireIO/Hangfire.Autofac/issues/8","labels_url":"https://api.github.com/repos/HangfireIO/Hangfire.Autofac/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/HangfireIO/Hangfire.Autofac/issues/8/comments","events_url":"https://api.github.com/repos/HangfireIO/Hangfire.Autofac/issues/8/events","html_url":"https://github.com/HangfireIO/Hangfire.Autofac/pull/8","id":127287035,"number":8,"title":"Allow combining lifetime scope tags","user":{"login":"chaoaretasty","id":1376088,"avatar_url":"https://avatars.githubusercontent.com/u/1376088?v=3","gravatar_id":"","url":"https://api.github.com/users/chaoaretasty","html_url":"https://github.com/chaoaretasty","followers_url":"https://api.github.com/users/chaoaretasty/followers","following_url":"https://api.github.com/users/chaoaretasty/following{/other_user}","gists_url":"https://api.github.com/users/chaoaretasty/gists{/gist_id}","starred_url":"https://api.github.com/users/chaoaretasty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaoaretasty/subscriptions","organizations_url":"https://api.github.com/users/chaoaretasty/orgs","repos_url":"https://api.github.com/users/chaoaretasty/repos","events_url":"https://api.github.com/users/chaoaretasty/events{/privacy}","received_events_url":"https://api.github.com/users/chaoaretasty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-18T18:34:21Z","updated_at":"2016-01-19T11:20:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HangfireIO/Hangfire.Autofac/pulls/8","html_url":"https://github.com/HangfireIO/Hangfire.Autofac/pull/8","diff_url":"https://github.com/HangfireIO/Hangfire.Autofac/pull/8.diff","patch_url":"https://github.com/HangfireIO/Hangfire.Autofac/pull/8.patch"},"body":"Autofac's lifetimeScope registration methods such as `InstancePerRequest` and `InstancePerMatchingLifetimeScope` take a `params object[] lifetimeScopeTags` at the end allowing easy combining of allowed scopes. I've added this parameter to `InstancePerBackgroundJob`.\r\n\r\nThis lets people call `InstancePerBackgroundJob(Autofac.Core.Lifetime.MatchingScopeLifetimeTags.RequestLifetimeScopeTag)` allowing for proper registration of a component for either webrequests or background jobs, as well as allowing people to bring in their own tags if needed."},"comment":{"url":"https://api.github.com/repos/HangfireIO/Hangfire.Autofac/issues/comments/172821500","html_url":"https://github.com/HangfireIO/Hangfire.Autofac/pull/8#issuecomment-172821500","issue_url":"https://api.github.com/repos/HangfireIO/Hangfire.Autofac/issues/8","id":172821500,"user":{"login":"odinserj","id":1078718,"avatar_url":"https://avatars.githubusercontent.com/u/1078718?v=3","gravatar_id":"","url":"https://api.github.com/users/odinserj","html_url":"https://github.com/odinserj","followers_url":"https://api.github.com/users/odinserj/followers","following_url":"https://api.github.com/users/odinserj/following{/other_user}","gists_url":"https://api.github.com/users/odinserj/gists{/gist_id}","starred_url":"https://api.github.com/users/odinserj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinserj/subscriptions","organizations_url":"https://api.github.com/users/odinserj/orgs","repos_url":"https://api.github.com/users/odinserj/repos","events_url":"https://api.github.com/users/odinserj/events{/privacy}","received_events_url":"https://api.github.com/users/odinserj/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T11:20:29Z","updated_at":"2016-01-19T11:20:29Z","body":"Maybe it is better to use `AutofacJobActivator.LifetimeScopeTag` (public since 2.0.1) for this completely custom scenario, leaving `InstancePerRequest` and `InstancePerBackgroundJob` methods untouched? We can document this field in the readme file."}}