@@ -136,11 +136,11 @@ protected virtual void ValidateEnabledOperations(IList<OperationContainer> opera
136
136
for ( int operationIndex = 0 ; operationIndex < operations . Count ; operationIndex ++ )
137
137
{
138
138
IJsonApiRequest operationRequest = operations [ operationIndex ] . Request ;
139
- WriteOperationKind operationKind = operationRequest . WriteOperation ! . Value ;
139
+ WriteOperationKind writeOperation = operationRequest . WriteOperation ! . Value ;
140
140
141
- if ( operationRequest . Relationship != null && ! _operationFilter . IsEnabled ( operationRequest . Relationship . LeftType , operationKind ) )
141
+ if ( operationRequest . Relationship != null && ! _operationFilter . IsEnabled ( operationRequest . Relationship . LeftType , writeOperation ) )
142
142
{
143
- string operationCode = GetOperationCodeText ( operationKind ) ;
143
+ string operationCode = GetOperationCodeText ( writeOperation ) ;
144
144
145
145
errors . Add ( new ErrorObject ( HttpStatusCode . Forbidden )
146
146
{
@@ -153,9 +153,9 @@ protected virtual void ValidateEnabledOperations(IList<OperationContainer> opera
153
153
}
154
154
} ) ;
155
155
}
156
- else if ( operationRequest . PrimaryResourceType != null && ! _operationFilter . IsEnabled ( operationRequest . PrimaryResourceType , operationKind ) )
156
+ else if ( operationRequest . PrimaryResourceType != null && ! _operationFilter . IsEnabled ( operationRequest . PrimaryResourceType , writeOperation ) )
157
157
{
158
- string operationCode = GetOperationCodeText ( operationKind ) ;
158
+ string operationCode = GetOperationCodeText ( writeOperation ) ;
159
159
160
160
errors . Add ( new ErrorObject ( HttpStatusCode . Forbidden )
161
161
{
@@ -175,17 +175,17 @@ protected virtual void ValidateEnabledOperations(IList<OperationContainer> opera
175
175
}
176
176
}
177
177
178
- private static string GetOperationCodeText ( WriteOperationKind operationKind )
178
+ private static string GetOperationCodeText ( WriteOperationKind writeOperation )
179
179
{
180
- AtomicOperationCode operationCode = operationKind switch
180
+ AtomicOperationCode operationCode = writeOperation switch
181
181
{
182
182
WriteOperationKind . CreateResource => AtomicOperationCode . Add ,
183
183
WriteOperationKind . UpdateResource => AtomicOperationCode . Update ,
184
184
WriteOperationKind . DeleteResource => AtomicOperationCode . Remove ,
185
185
WriteOperationKind . AddToRelationship => AtomicOperationCode . Add ,
186
186
WriteOperationKind . SetRelationship => AtomicOperationCode . Update ,
187
187
WriteOperationKind . RemoveFromRelationship => AtomicOperationCode . Remove ,
188
- _ => throw new NotSupportedException ( $ "Unknown operation kind '{ operationKind } '.")
188
+ _ => throw new NotSupportedException ( $ "Unknown operation kind '{ writeOperation } '.")
189
189
} ;
190
190
191
191
return operationCode . ToString ( ) . ToLowerInvariant ( ) ;
0 commit comments