public async Task <PackageEntry> findPackageByIdAsync(ObjectId id) { var found = await m_Packagecollection.FindAsync(HashExtentions.filterById(id)).Result.FirstOrDefaultAsync(); if (found != null) { return(DatabaseExtentions <PackageEntryDb> .Deserialize(found)); } return(null); }
public PackageEntry findPackageByFileName(string fileName) { var found = m_Packagecollection.FindAsync(HashExtentions.filterByFileName(fileName)).Result.FirstOrDefault(); if (found != null) { return(DatabaseExtentions <PackageEntryDb> .Deserialize(found)); } return(null); }
public async Task <IpkInfoDb> findPackageBySha1Async(string sha1) { var found = await m_Ipkcollection.FindAsync(HashExtentions.filterBIpkBySha1(sha1)).Result.FirstOrDefaultAsync(); if (found != null) { return(found); } return(null); }
public async Task <BinaryVariationsDbEntry> findFileSystemByKey(string key) { var found = await m_BinaryVaryCollection.FindAsync(HashExtentions.filterByKey(key)); if (found != null) { return(DatabaseExtentions <BinaryVariationsDbEntry> .Deserialize(found.FirstOrDefault())); } return(null); }
public async Task<PackageEntry> GetPackageByHash(string hash) { var found = await m_Hashcollection.FindAsync(HashExtentions.filterByHash(hash)).Result.FirstOrDefaultAsync(); if (found != null) { HashEntry he = DatabaseExtentions<HashEntry>.Deserialize(found); return await PackageDb.Instance.findPackageByIdAsync(he.PackageRef); } return null; }