using System; using System.Threading; using System.Threading.Tasks; namespace ZB.MOM.WW.CBDDC.Core.Resilience; public interface IRetryPolicy { /// /// Executes an asynchronous operation with retry handling. /// /// The operation to execute. /// The operation name used for diagnostics. /// A token used to cancel the operation. /// A task that represents the asynchronous execution. Task ExecuteAsync(Func operation, string operationName, CancellationToken cancellationToken = default); /// /// Executes an asynchronous operation with retry handling and returns a result. /// /// The result type. /// The operation to execute. /// The operation name used for diagnostics. /// A token used to cancel the operation. /// A task that represents the asynchronous execution and yields the operation result. Task ExecuteAsync(Func> operation, string operationName, CancellationToken cancellationToken = default); }