Table of Contents

Class AutoRejectService

Namespace
JD.AI.Core.Governance
Assembly
JD.AI.Core.dll

IApprovalService that always rejects requests. Use in locked-down environments where no operation may proceed without replacing this service with a human-in-the-loop implementation.

public sealed class AutoRejectService : IApprovalService
Inheritance
AutoRejectService
Implements
Inherited Members

Constructors

AutoRejectService(string)

public AutoRejectService(string reason = "Approval is required but no approval service is configured.")

Parameters

reason string

Rejection reason included in every ApprovalResult.

Methods

RequestApprovalAsync(ApprovalRequest, CancellationToken)

Requests approval for the described operation.

public Task<ApprovalResult> RequestApprovalAsync(ApprovalRequest request, CancellationToken ct = default)

Parameters

request ApprovalRequest

Details of the operation requiring approval.

ct CancellationToken

Cancellation token.

Returns

Task<ApprovalResult>

An ApprovalResult indicating whether to proceed.