Ejemplo n.º 1
0
        public void Delete(Seed seed)
        {
            lock (_lockObject)
            {
                var seedEntity = SeedEntity.Import(seed);

                var col = this.GetCollection();
                col.DeleteMany(n => n.Seed !.RootHash == seedEntity.RootHash);
            }
        }
Ejemplo n.º 2
0
        public bool Exists(Seed seed)
        {
            lock (_lockObject)
            {
                var seedEntity = SeedEntity.Import(seed);

                var col = this.GetCollection();
                return(col.Exists(n => n.Seed == seedEntity));
            }
        }
Ejemplo n.º 3
0
        public DownloadingFileItem?FindOne(Seed seed)
        {
            lock (_lockObject)
            {
                var seedEntity = SeedEntity.Import(seed);

                var col = this.GetCollection();
                return(col.FindOne(n => n.Seed == seedEntity).Export());
            }
        }
Ejemplo n.º 4
0
        //-----------------------------------------------------------------------------
        // Interaction Methods
        //-----------------------------------------------------------------------------

        // Called when a seed of the given type hits this tile.
        public virtual void OnSeedHit(SeedType type, SeedEntity seed)
        {
        }