using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; using xCategoryService.Models.Dtos; using xCategoryService.Models.Entities; using xCategoryService.Providers.Dtos; using xIdentityModels.Models; using xModels.Dtos; using xPushService.Interfaces; namespace xCategoryService.Interfaces { public interface IXSubCategoryProvider : IXBaseProvided { /// /// Check Has Specified Locale or not ... /// /// /// /// /// Task HasLocale( int id, string language, CancellationToken cancellationToken = default ); /// /// Load an Item by all of it's Related Translations ... /// /// /// /// Task GetResource( int id, CancellationToken cancellationToken = default ); /// /// Add Item for Specified Language ... /// /// /// /// /// /// /// Task Add( XSubCategoryDto item, string language = null, string connectionId = null, XUserClaimsInfoDto userInfo = null, CancellationToken cancellationToken = default ); /// /// Add Item by it's Locales and Reference ... /// /// /// /// /// /// Task AddResource( XSubCategoryResourceDto item, string connectionId = null, XUserClaimsInfoDto userInfo = null, CancellationToken cancellationToken = default ); /// /// Remove Item for Specified Language ... /// /// /// if null, Remove All /// /// /// /// Task Remove( int id, string language = null, string connectionId = null, XUserClaimsInfoDto userInfo = null, CancellationToken cancellationToken = default ); /// /// Update an Item for Specified Language ... /// /// /// /// /// /// /// /// Task Update( int id, XSubCategoryDto item, string language = null, string connectionId = null, XUserClaimsInfoDto userInfo = null, CancellationToken cancellationToken = default ); /// /// Refresh a Resource ... /// /// /// /// /// /// Task Refresh( XSubCategoryResourceDto resource, string connectionId = null, XUserClaimsInfoDto userInfo = null, CancellationToken cancellationToken = default ); /// /// Get All Resources ... /// /// /// Task> GetAllResources( CancellationToken cancellationToken = default ); /// /// Find One Resource ... /// /// /// /// Task FindOneResource( Expression> predicate = null, CancellationToken cancellationToken = default ); /// /// Find Many Resource ... /// /// /// /// /// Task> FindManyResource( Expression> predicate = null, Func, IOrderedQueryable> orderBuilder = null, CancellationToken cancellationToken = default ); /// /// Retrieve Resources by Query Pattern ... /// /// /// /// /// /// Task> QueryResources( XQuery query = null, Expression> predicate = null, Func, IOrderedQueryable> orderBuilder = null, CancellationToken cancellationToken = default ); /// /// Get All Resources as Async Enumerable ... /// /// /// IAsyncEnumerable GetAllResourcesAsAsyncEnumerable( CancellationToken cancellationToken = default ); } }