using System.IO.Compression; using System.Threading.Tasks; using ColdMint.scripts.database; namespace ColdMint.scripts.dataPack.entryLoader; public interface IEntryLoader { /// /// Whether to load /// 是否需要加载 /// /// /// bool NeedLoad(ZipArchiveEntry archiveEntry); /// /// Execution load /// 执行加载 /// /// ///It is only necessary to add or update data to dataPackDbContext in this method. When the scan is completed, the upper layer code will be uniformly submitted to the database ///仅需要在此方法内将数据add或者update到dataPackDbContext内,当扫描结束后,上层代码会统一提交到数据库 /// Do not query the existence of the old project from the database within this method, because the save request is also submitted to the database. /// 不要在此方法内从数据库查询旧的项目是否存在,因为还为向数据库提交保存请求。 /// /// Task ExecutionLoad(string namespaceString, string zipFileName, DataPackDbContext dataPackDbContext, ZipArchiveEntry archiveEntry); }