@@ -136,11 +136,11 @@ protected virtual void ValidateEnabledOperations(IList<OperationContainer> opera
136136 for ( int operationIndex = 0 ; operationIndex < operations . Count ; operationIndex ++ )
137137 {
138138 IJsonApiRequest operationRequest = operations [ operationIndex ] . Request ;
139- WriteOperationKind operationKind = operationRequest . WriteOperation ! . Value ;
139+ WriteOperationKind writeOperation = operationRequest . WriteOperation ! . Value ;
140140
141- if ( operationRequest . Relationship != null && ! _operationFilter . IsEnabled ( operationRequest . Relationship . LeftType , operationKind ) )
141+ if ( operationRequest . Relationship != null && ! _operationFilter . IsEnabled ( operationRequest . Relationship . LeftType , writeOperation ) )
142142 {
143- string operationCode = GetOperationCodeText ( operationKind ) ;
143+ string operationCode = GetOperationCodeText ( writeOperation ) ;
144144
145145 errors . Add ( new ErrorObject ( HttpStatusCode . Forbidden )
146146 {
@@ -153,9 +153,9 @@ protected virtual void ValidateEnabledOperations(IList<OperationContainer> opera
153153 }
154154 } ) ;
155155 }
156- else if ( operationRequest . PrimaryResourceType != null && ! _operationFilter . IsEnabled ( operationRequest . PrimaryResourceType , operationKind ) )
156+ else if ( operationRequest . PrimaryResourceType != null && ! _operationFilter . IsEnabled ( operationRequest . PrimaryResourceType , writeOperation ) )
157157 {
158- string operationCode = GetOperationCodeText ( operationKind ) ;
158+ string operationCode = GetOperationCodeText ( writeOperation ) ;
159159
160160 errors . Add ( new ErrorObject ( HttpStatusCode . Forbidden )
161161 {
@@ -175,17 +175,17 @@ protected virtual void ValidateEnabledOperations(IList<OperationContainer> opera
175175 }
176176 }
177177
178- private static string GetOperationCodeText ( WriteOperationKind operationKind )
178+ private static string GetOperationCodeText ( WriteOperationKind writeOperation )
179179 {
180- AtomicOperationCode operationCode = operationKind switch
180+ AtomicOperationCode operationCode = writeOperation switch
181181 {
182182 WriteOperationKind . CreateResource => AtomicOperationCode . Add ,
183183 WriteOperationKind . UpdateResource => AtomicOperationCode . Update ,
184184 WriteOperationKind . DeleteResource => AtomicOperationCode . Remove ,
185185 WriteOperationKind . AddToRelationship => AtomicOperationCode . Add ,
186186 WriteOperationKind . SetRelationship => AtomicOperationCode . Update ,
187187 WriteOperationKind . RemoveFromRelationship => AtomicOperationCode . Remove ,
188- _ => throw new NotSupportedException ( $ "Unknown operation kind '{ operationKind } '.")
188+ _ => throw new NotSupportedException ( $ "Unknown operation kind '{ writeOperation } '.")
189189 } ;
190190
191191 return operationCode . ToString ( ) . ToLowerInvariant ( ) ;
0 commit comments