Пример #1
0
 public void Remove(Chanpin chanpin)
 {
     this._lock.AcquireWriterLock(0);
     try
     {
         this._chanpinList.Remove(chanpin);
     }
     finally
     {
         this._lock.ReleaseWriterLock();
     }
 }
Пример #2
0
 public List <Dingdan> GetDingdan(Chanpin chanpin)
 {
     this._lock.AcquireReaderLock(0);
     try
     {
         return(this._dingdanList.Where(d => d.MingxiList.Any(m => m.Chanpin == chanpin)).ToList());
     }
     finally
     {
         this._lock.ReleaseReaderLock();
     }
 }