File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
namespace NServiceBus
2
2
{
3
3
using System ;
4
+ #if NETSTANDARD
5
+ using System . Runtime . InteropServices ;
6
+ #endif
4
7
using System . Security . Principal ;
5
8
using System . Threading . Tasks ;
6
9
using Settings ;
@@ -30,8 +33,14 @@ public async Task<IEndpointInstance> Start()
30
33
31
34
await transportInfrastructure . Start ( ) . ConfigureAwait ( false ) ;
32
35
36
+ #if NETSTANDARD
37
+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
38
+ {
39
+ AppDomain . CurrentDomain . SetPrincipalPolicy ( PrincipalPolicy . WindowsPrincipal ) ;
40
+ }
41
+ #else
33
42
AppDomain . CurrentDomain . SetPrincipalPolicy ( PrincipalPolicy . WindowsPrincipal ) ;
34
-
43
+ #endif
35
44
await receiveComponent . Initialize ( containerComponent , recoverabilityComponent ) . ConfigureAwait ( false ) ;
36
45
37
46
await featureComponent . Start ( messageSession ) . ConfigureAwait ( false ) ;
You can’t perform that action at this time.
0 commit comments