@@ -499,11 +499,9 @@ public virtual bool CanReadProperty(IPropertyInfo property)
499
499
if ( property is null )
500
500
throw new ArgumentNullException ( nameof ( property ) ) ;
501
501
502
- var result = true ;
503
-
504
502
VerifyAuthorizationCache ( ) ;
505
503
506
- if ( ! _readResultCache ! . TryGetValue ( property . Name , out result ) )
504
+ if ( ! _readResultCache ! . TryGetValue ( property . Name , out var result ) )
507
505
{
508
506
result = BusinessRules . HasPermission ( ApplicationContext , AuthorizationActions . ReadProperty , property ) ;
509
507
if ( BusinessRules . CachePermissionResult ( AuthorizationActions . ReadProperty , property ) )
@@ -579,11 +577,9 @@ public virtual bool CanWriteProperty(IPropertyInfo property)
579
577
if ( property is null )
580
578
throw new ArgumentNullException ( nameof ( property ) ) ;
581
579
582
- bool result = true ;
583
-
584
580
VerifyAuthorizationCache ( ) ;
585
581
586
- if ( ! _writeResultCache ! . TryGetValue ( property . Name , out result ) )
582
+ if ( ! _writeResultCache ! . TryGetValue ( property . Name , out var result ) )
587
583
{
588
584
result = BusinessRules . HasPermission ( ApplicationContext , AuthorizationActions . WriteProperty , property ) ;
589
585
if ( BusinessRules . CachePermissionResult ( AuthorizationActions . WriteProperty , property ) )
@@ -683,11 +679,9 @@ public virtual bool CanExecuteMethod(IMemberInfo method)
683
679
if ( method is null )
684
680
throw new ArgumentNullException ( nameof ( method ) ) ;
685
681
686
- bool result = true ;
687
-
688
682
VerifyAuthorizationCache ( ) ;
689
683
690
- if ( ! _executeResultCache ! . TryGetValue ( method . Name , out result ) )
684
+ if ( ! _executeResultCache ! . TryGetValue ( method . Name , out var result ) )
691
685
{
692
686
result = BusinessRules . HasPermission ( ApplicationContext , AuthorizationActions . ExecuteMethod , method ) ;
693
687
if ( BusinessRules . CachePermissionResult ( AuthorizationActions . ExecuteMethod , method ) )
0 commit comments