Esempio 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);
            }
        }
Esempio 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));
            }
        }
Esempio 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());
            }
        }
Esempio n. 4
0
        //-----------------------------------------------------------------------------
        // Interaction Methods
        //-----------------------------------------------------------------------------

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