示例#1
0
        public Task <AssetObject[]> CheckIntegrityAsync(AssetsInfo info)
        {
            var query =
                info.Objects?
                .Select(pair => pair.Value)
                .AsParallel()
                .Where(obj =>
            {
                string objPath = $"{_gamePathService.AssetsDir}/objects/{obj.Path}";
                return(!(File.Exists(objPath) && CryptUtil.ValidateFileSHA1(objPath, obj.Hash)));
            });

            return(Task.FromResult(query?.ToArray()));
        }