public void MergeFrom(IMergeSource other)
 {
     if (other is SingleValueMergeSource)
     {
         this.HitCount += ((SingleValueMergeSource)other).Value;
     }
     else
     {
         this.HitCount += (other as InternalHitCount).HitCount;
     }
 }
Beispiel #2
0
        public string GetLocalPath(IMergeSource mergeSource)
        {
            var localPath = mergeSource.ServerItem.Replace(TfsPath, Path);

            if (localPath == mergeSource.ServerItem)
            {
                localPath = AssertTrailingSlash(mergeSource.ServerItem).Replace(TfsPath, Path);
            }

            return(localPath);
        }
 public void MergeFrom(IMergeSource other)
 {
     if (other.MultiValue)
     {
         if (other is MultiValueMergeSource)
         {
             var mergeSource = (MultiValueMergeSource)other;
             this.SampleCount += mergeSource.BufferedData.ReadValuesInto(this.samples, mergeSource.StartOffset);
         }
         else
         {
             var mergeSource = other as InternalHistogram;
             mergeSource.UpdateDictionary(this.samples);
             this.SampleCount += mergeSource.SampleCount;
         }
     }
     else
     {
         var mergeSource = (SingleValueMergeSource)other;
         this.AddValue(mergeSource.Value);
     }
 }
Beispiel #4
0
 public void MergeFrom(IMergeSource other)
 {
     if (other is SingleValueMergeSource)
     {
         this.HitCount += ((SingleValueMergeSource)other).Value;
     }
     else
     {
         this.HitCount += (other as InternalHitCount).HitCount;
     }
 }
Beispiel #5
0
 public void MergeFrom(IMergeSource other)
 {
     if (other.MultiValue)
     {
         if (other is MultiValueMergeSource)
         {
             var mergeSource = (MultiValueMergeSource)other;
             this.SampleCount += mergeSource.BufferedData.ReadValuesInto(this.samples, mergeSource.StartOffset);
         }
         else
         {
             var mergeSource = other as InternalHistogram;
             mergeSource.UpdateDictionary(this.samples);
             this.SampleCount += mergeSource.SampleCount;
         }
     }
     else
     {
         var mergeSource = (SingleValueMergeSource)other;
         this.AddValue(mergeSource.Value);
     }
 }
 public void MergeFrom(IMergeSource other)
 {
     this.Value += ((LongData)other).Value;
 }
Beispiel #7
0
 public void MergeFrom(IMergeSource other)
 {
     this.Value += ((LongData)other).Value;
 }
Beispiel #8
0
 public bool Match(IMergeSource mergeSource)
 {
     return(mergeSource.ServerItem.StartsWith(TfsPath));
 }