public void Validate() { if (ZipkinBaseUri == null) { throw new ArgumentNullException("ZipkinBaseUri"); } if (Domain == null) { Domain = request => new Uri(request.Uri.Host); } if (ExcludedPathList == null) { throw new ArgumentNullException("ExcludedPathList"); } if (ExcludedPathList.Any(item => !item.StartsWith("/"))) { throw new ArgumentException("Item of ExcludedPathList must start with '/'. e.g.) '/check_uri'"); } if (SampleRate < 0 || SampleRate > 1) { throw new ArgumentException("SampleRate must range from 0 to 1."); } if (NotToBeDisplayedDomainList == null) { throw new ArgumentNullException("NotToBeDisplayedDomainList"); } }
internal bool IsInDontSampleList(string path) { if (path != null) { if (ExcludedPathList.Any(uri => path.StartsWith(uri, StringComparison.InvariantCultureIgnoreCase))) { return(true); } } return(false); }
private bool IsInDontSampleList(string path) { return(path != null && ExcludedPathList.Any(uri => path.StartsWith(uri, StringComparison.CurrentCultureIgnoreCase))); }