using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using xCommons.Configurations; using xModels.Dtos; using xPushService.Interfaces; using xStringService.Models.Dtos; using xStringService.Models.Entities; using xStringService.Providers.Dtos; namespace xStringService.Interfaces.Dtos { public interface IXStringServiceProvider : IXBaseDtoProvider { /// /// Application Configuration ... /// XAppConfiguration AppConfiguration { get; } // #region Retrievers ... /// /// Retrieve all Exists Languages ... /// /// /// Task> GetLanguages( CancellationToken cancellationToken = default ); /// /// Check Specified Resource Exists or not ... /// /// /// /// /// Task IsResourceExists( string resource, string language = null, CancellationToken cancellationToken = default ); /// /// Retrieve Specified Resource ... /// /// /// /// /// Task Get( string resource, string language = null, CancellationToken cancellationToken = default ); /// /// Retrieve Specified Translation of Specified Resource ... /// /// /// /// /// Task GetResourceValue( string resource, string language = null, CancellationToken cancellationToken = default ); /// /// Retrieve an Specified Resource Items ... /// /// /// /// Task> GetResources( string resource, CancellationToken cancellationToken = default ); /// /// Retrieve Specified Resource Items as XResourceDto Presentation ... /// /// /// /// Task GetResource( string resource, CancellationToken cancellationToken = default ); #endregion // #region Query ... /// /// Query Resource IDs ... /// /// /// /// Task> QueryResourceIds( XQuery query, CancellationToken cancellationToken = default ); /// /// Query Specified Language Resources ... /// /// /// /// /// Task> QueryLanguageResources( XQuery query, string language = null, CancellationToken cancellationToken = default ); /// /// Query Locale Resources ... /// /// /// /// /// Task> QueryLocaleResources( XQuery query, string language = null, CancellationToken cancellationToken = default ); #endregion // #region Add/Update Actions ... /// /// Add Specified Resource ... /// /// /// /// /// /// /// Task Add( string resource, string value, string language = null, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Update Resource ... /// /// /// /// /// /// /// Task Update( string resource, string value, string language = null, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Add Or Update Resource ... /// /// /// /// /// /// /// Task AddOrUpdate( string resource, string value, string language = null, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Add Specified Locale Resource ... /// /// /// /// /// /// Task AddByLocaleResource( XLocaleResourceDto item, string resource, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Update Specified Locale Resource ... /// /// /// /// /// /// Task UpdateByLocaleResource( XLocaleResourceDto item, string resource, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Add Or Update Resource By Locale ... /// /// /// /// /// /// Task AddOrUpdateByLocaleResource( XLocaleResourceDto item, string resource, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Add Or Update all XResourceDto(s) Locales ... /// /// /// /// /// Task> AddByResource( XResourceDto item, string connectionId = null, CancellationToken cancellationToken = default ); #endregion // #region Remove Actions ... /// /// Remove all Specified Language's Resources ... /// /// /// /// /// Task RemoveLanguageResources( string language, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Remove all Specified Resource Ids instances ... /// /// /// /// /// Task> RemoveResource( string resource, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Remove Specified Resource ... /// /// /// /// /// /// Task Remove( string resource, string language = null, string connectionId = null, CancellationToken cancellationToken = default ); /// /// Remove all Resource of Specified XResourceDto ... /// /// /// /// /// Task RemoveByResource( XResourceDto item, string connectionId = null, CancellationToken cancellationToken = default ); #endregion } }