public void Remove(Chanpin chanpin) { this._lock.AcquireWriterLock(0); try { this._chanpinList.Remove(chanpin); } finally { this._lock.ReleaseWriterLock(); } }
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(); } }