using System.Threading.Tasks; using Wino.Core.Domain.Models.Errors; namespace Wino.Core.Domain.Interfaces; /// /// Interface for handling specific synchronizer errors /// public interface ISynchronizerErrorHandler { /// /// Determines if this handler can handle the specified error /// /// The error to check /// True if this handler can handle the error, false otherwise bool CanHandle(SynchronizerErrorContext error); /// /// Handles the specified error /// /// The error to handle /// A task that completes when the error is handled Task HandleAsync(SynchronizerErrorContext error); } public interface ISynchronizerErrorHandlerFactory { Task HandleErrorAsync(SynchronizerErrorContext error); } public interface IOutlookSynchronizerErrorHandlerFactory : ISynchronizerErrorHandlerFactory; public interface IGmailSynchronizerErrorHandlerFactory : ISynchronizerErrorHandlerFactory;