using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using xFileService.Models.Dtos; using xFileService.Models.Entities; using xIdentityModels.Models; using xModels.Dtos; using XFileDto = xFileService.Models.Dtos.XFileDto; // using xModels.Dtos; using xTagService.Interfaces; namespace xFileService.Interfaces { public interface IXBaseFileProvider { // #region Props ... /// /// Specified Provider ... /// string ProvidedFor { get; } /// /// Specified Provider Repositroy ... /// IXFileProvider Provider { get; } #endregion // #region Helper ... /// /// Get Specified Identifier ... /// /// /// string GetIdentifier(TKey forProvidedId); #endregion // #region Tools ... /// /// Stream Specified File ... /// /// /// Task Stream(Guid id); /// /// Stream Specified File ... /// /// /// Task Stream(string fileName); /// /// Download Specified File ... /// /// /// Task Download(Guid id); /// /// Download Specified File ... /// /// /// Task Download(string fileName); /// /// Upload Files ... /// /// /// /// /// /// Task> Upload( TKey forProvidedId, IFormFileCollection files, XUserClaimsInfoDto userInfo = null, string connectionId = null ); /// /// Remove Specified Files ... /// /// /// /// /// /// Task> Remove( TKey forProvidedId, string ids = null, XUserClaimsInfoDto userInfo = null, string connectionId = null ); /// /// Retrieve Specified File Streaming Info ... /// /// /// Task GetFileDescriptor(Guid id); /// /// Retrieve Specified File Streaming Info ... /// /// /// Task GetFileDescriptor(string fileName); #endregion // #region Data Model ... /// /// Get Specified File Model ... /// /// /// Task Get( Guid id ); /// /// Get All Exists File Models ... /// /// /// Task> GetAll(); /// /// Get All Exists File Models ... /// /// /// Task> GetAllFor(TKey forProvidedId); /// /// find an Entity by providing a Conditional Expression ... /// /// Task FindOne(Expression> whereClause); /// /// find a collection of Entities by proving a Conditional Expression ... /// /// /// Task> FindMany( Expression> whereClause ); /// /// retrieve Entities based on XQuery Pagination structure ... /// /// /// Task> Query( XQuery query ); /// /// retrieve Entities based on XQuery Pagination structure by providing a Conditional Expression ... /// /// /// /// Task> ConditionalQuery( Expression> whereClause, XQuery query ); /// /// Update an Entity values ... /// /// /// /// /// Task Update( Guid id, XFileDto item, XUserClaimsInfoDto userInfo = null ); /// /// remove an Entity ... /// /// /// /// Task Remove( Guid id, XUserClaimsInfoDto userInfo = null ); /// /// count all exists Entities ... /// /// Task Count(); /// /// Check an Entity exists or not ... /// /// /// Task IsExists( Guid id ); #endregion } }