Interface IAtomicOperationFilter
- Namespace
- JsonApiDotNetCore.AtomicOperations
- Assembly
- JsonApiDotNetCore.dll
Determines whether an operation in an atomic:operations request can be used. For non-operations requests, see IJsonApiEndpointFilter.
[PublicAPI]
public interface IAtomicOperationFilter
Remarks
The default implementation relies on the usage of GenerateControllerEndpoints. If you're using explicit (non-generated) controllers, register your own implementation to indicate which operations are accessible.
Properties
AlwaysEnabled
An IAtomicOperationFilter that always returns true. Provided for convenience, to revert to the original behavior from before
filtering was introduced.
public static IAtomicOperationFilter AlwaysEnabled { get; }
Property Value
Methods
IsEnabled(ResourceType, WriteOperationKind)
Determines whether the specified operation can be used in an atomic:operations request.
bool IsEnabled(ResourceType resourceType, WriteOperationKind writeOperation)
Parameters
resourceTypeResourceTypeThe targeted primary resource type of the operation.
writeOperationWriteOperationKindThe operation kind.