コード例 #1
0
ファイル: Queue.cs プロジェクト: zhuyue1314/CodeContracts
 public WorkToDo(ISliceId sliceId, DateTime time, ISliceHash sliceHash, TPriority priority)
 {
     this.sliceId   = sliceId;
     this.time      = time;
     this.sliceHash = sliceHash;
     this.Priority  = priority;
 }
コード例 #2
0
 public void MarkAsComputed(ISliceId sliceId, ISliceHash sliceHash)
 {
     lock (this.LockComputed)
         this.computed.Add(Pair.For(sliceId, sliceHash));
 }
コード例 #3
0
 public bool AlreadyComputed(ISliceId sliceId, ISliceHash sliceHash)
 {
     lock (this.LockComputed)
         return(this.computed.Contains(Pair.For(sliceId, sliceHash)));
 }
コード例 #4
0
 public bool Equals(ISliceHash other)
 {
     return(other != null && this.Hash.Equals(other.Hash));
 }