File tree Expand file tree Collapse file tree 3 files changed +18
-6
lines changed
Expand file tree Collapse file tree 3 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 11<Project >
22 <PropertyGroup >
3- <Version >9.5.1-rc1 </Version >
3+ <Version >9.5.2 </Version >
44 <TargetFramework >net8.0</TargetFramework >
55 </PropertyGroup >
66
Original file line number Diff line number Diff line change 44using System . Globalization ;
55using Fusonic . Extensions . Common . Security ;
66using Fusonic . Extensions . Mediator ;
7+ using Hangfire ;
78using Hangfire . Server ;
89using SimpleInjector ;
910
1011namespace Fusonic . Extensions . Hangfire ;
1112
1213public class JobProcessor ( Container container ) : IJobProcessor
1314{
14- private readonly Container container = container ;
15-
15+ [ JobDisplayName ( "OutOfBand {0}" ) ]
1616 public virtual Task ProcessAsync ( MediatorHandlerContext context , PerformContext performContext )
1717 {
1818 if ( context . Culture != null )
Original file line number Diff line number Diff line change 66
77namespace Fusonic . Extensions . Hangfire ;
88
9- public class MediatorHandlerContext ( object message , string handlerType )
9+ public class MediatorHandlerContext
1010{
11- public object Message { get ; set ; } = message ;
12- public string HandlerType { get ; set ; } = handlerType ;
11+ public MediatorHandlerContext ( object message , string handlerType )
12+ {
13+ Message = message ;
14+ HandlerType = handlerType ;
15+
16+ var type = Message . GetType ( ) ;
17+ DisplayName = $ "Message: { type . Name } ({ type . Namespace } )";
18+ }
19+
20+ public object Message { get ; set ; }
21+ public string HandlerType { get ; set ; }
1322 public CultureInfo ? Culture { get ; set ; }
1423 public CultureInfo ? UiCulture { get ; set ; }
1524 public HangfireUser ? User { get ; set ; }
25+ public string DisplayName { get ; set ; }
26+
27+ public override string ToString ( ) => DisplayName ;
1628
1729 public class HangfireUser ( List < HangfireUser . HangfireUserClaim > claims )
1830 {
You can’t perform that action at this time.
0 commit comments