Table of Contents

Interface IAtomicOperationFilter

Namespace
JsonApiDotNetCore.AtomicOperations
Assembly
JsonApiDotNetCore.dll

Determines whether an operation in an atomic:operations request can be used.

[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

IAtomicOperationFilter

Methods

IsEnabled(ResourceType, WriteOperationKind)

Determines whether the specified operation can be used in an atomic:operations request.

bool IsEnabled(ResourceType resourceType, WriteOperationKind writeOperation)

Parameters

resourceType ResourceType

The targeted primary resource type of the operation.

writeOperation WriteOperationKind

The operation kind.

Returns

bool