This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Define your own session and add your custom field to it | |
//Then, you can inject MyAppSession and use it's new property in your project. | |
public class MyAppSession : ClaimsAbpSession, ITransientDependency | |
{ | |
public MyAppSession( | |
IPrincipalAccessor principalAccessor, | |
IMultiTenancyConfig multiTenancy, | |
ITenantResolver tenantResolver, | |
IAmbientScopeProvider<SessionOverride> sessionOverrideScopeProvider) : | |
base(principalAccessor, multiTenancy, tenantResolver, sessionOverrideScopeProvider) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To configure Hangfire | |
//Windsor integration | |
//The activator | |
var jobActivator = new WindsorScopedJobActivator(windsorContainer); | |
GlobalConfiguration.Configuration.UseActivator(jobActivator); | |
//And something to create and dispose of a child container in the activator for each job | |
var windsorJobFilter = new WindsorContainerPerJobFilterAttribute(jobActivator); | |
GlobalJobFilters.Filters.Add(windsorJobFilter); |