Example #1
0
        public void GetSelectorsStart(Context context, Fingerprint fingerprint)
        {
            if (_eventSource.IsEnabled())
            {
                _eventSource.GetSelectorsStart(context.Id.ToString(), fingerprint.ToHex());
            }

            _getSelectorsCallCounter.Started();
        }
Example #2
0
 private Task <SelectorsResponse> GetSelectorsInternal(
     string cacheNamespace,
     Fingerprint weakFingerprint,
     Dictionary <string, string> queryParameters)
 {
     return(GetAsync <SelectorsResponse>(
                BuildCacheResourceIds.SelectorResourceId,
                new { cacheNamespace, weakFingerprint = weakFingerprint.ToHex() },
                null,
                queryParameters));
 }
Example #3
0
        public void GetSelectorsStart(Context context, Fingerprint fingerprint)
        {
            if (_eventSource.IsEnabled())
            {
                _eventSource.GetSelectorsStart(context.Id.ToString(), fingerprint.ToHex());
            }

            _getSelectorsCallCounter.Started();

            if (context.IsEnabled)
            {
                Debug(context, $"{Name}.GetSelectors({fingerprint}) start");
            }
        }
Example #4
0
 /// <summary>
 ///     Serialize <see cref="Fingerprint"/>
 /// </summary>
 /// <param name="fingerprint">Weak fingerprint</param>
 private static string SerializeWithHashType(Fingerprint fingerprint)
 {
     // We now do not care about the hash type. To maintain compatibility with
     // old users (only BuildXL), hard code the type so we do not break old code.
     return(fingerprint.ToHex() + HashTypeSeparator + HashType.SHA1);
 }
Example #5
0
 /// <inheritdoc />
 public override string ToString()
 {
     return(Hash.ToHex());
 }
Example #6
0
        public void ToStringIsToHex()
        {
            var v = new Fingerprint("ABCD");

            Assert.Equal(v.ToHex(), v.ToString());
        }