public void Delete(Seed seed) { lock (_lockObject) { var seedEntity = SeedEntity.Import(seed); var col = this.GetCollection(); col.DeleteMany(n => n.Seed !.RootHash == seedEntity.RootHash); } }
public bool Exists(Seed seed) { lock (_lockObject) { var seedEntity = SeedEntity.Import(seed); var col = this.GetCollection(); return(col.Exists(n => n.Seed == seedEntity)); } }
public DownloadingFileItem?FindOne(Seed seed) { lock (_lockObject) { var seedEntity = SeedEntity.Import(seed); var col = this.GetCollection(); return(col.FindOne(n => n.Seed == seedEntity).Export()); } }
//----------------------------------------------------------------------------- // Interaction Methods //----------------------------------------------------------------------------- // Called when a seed of the given type hits this tile. public virtual void OnSeedHit(SeedType type, SeedEntity seed) { }