public void MergeFrom(IMergeSource other)
 {
     if (other is SingleValueMergeSource)
     {
         this.HitCount += ((SingleValueMergeSource)other).Value;
     }
     else
     {
         this.HitCount += (other as InternalHitCount).HitCount;
     }
 }
示例#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);
     }
 }
示例#4
0
 public void MergeFrom(IMergeSource other)
 {
     if (other is SingleValueMergeSource)
     {
         this.HitCount += ((SingleValueMergeSource)other).Value;
     }
     else
     {
         this.HitCount += (other as InternalHitCount).HitCount;
     }
 }
示例#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;
 }
示例#7
0
 public void MergeFrom(IMergeSource other)
 {
     this.Value += ((LongData)other).Value;
 }
示例#8
0
 public bool Match(IMergeSource mergeSource)
 {
     return(mergeSource.ServerItem.StartsWith(TfsPath));
 }