using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using xCommons.Configurations; using xModels.Dtos; using xStringService.Interfaces.Dtos; using xStringService.Models.Dtos; namespace xStringService.Interfaces { /// /// a Base Class for Handling Resources Based on Specified Types on /// String Resources Use ... /// such as: /// - Terms and Conditions; /// - Contents; /// - News; /// - etc ... /// public interface IXBaseStringResourceProvider { // #region Props ... string Prefix { get; } IXStringServiceProvider Provider { get; } XAppConfiguration AppConfiguration { get; } #endregion // #region Actions ... /// /// Prepare Resource Title by Given Data ... /// /// /// string GetResourceTitle(string suffix); /// /// Add Specified Locales ... /// /// /// /// /// /// Task> Add( string suffix, IEnumerable locales, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Add Or Update Specified Locals ... /// /// /// /// /// /// Task> AddOrUpdate( string resource, IEnumerable locales, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Get Specified Locale ... /// /// /// /// /// Task GetLocale( string suffix, string language = null, CancellationToken cancellationToken = default ); /// /// Add Specified Resource ... /// /// /// /// /// /// Task AddResource( string suffix, XResourceDto item, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Get Resources of Specified Resource ... /// /// /// /// Task GetResource( string suffix, CancellationToken cancellationToken = default ); /// /// Remove Specified Suffix Resources ... /// /// /// /// /// Task Remove( string suffix, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Remove Specified Resource ... /// /// /// /// /// /// Task Remove( string resource, string language, string connectionId = null, CancellationToken cancellationToken = default ); #endregion } }