コード例 #1
0
        /// <summary>
        /// Will insert a rule according to how high the Priority field is set.
        /// If the priority is equal to other rules, the new rule will be the last in that priority group.
        /// </summary>
        /// <param name="rule">The new rule being registered.</param>
        public void RegisterRule(ISamplingRule rule)
        {
            for (var i = 0; i < _rules.Count; i++)
            {
                if (_rules[i].Priority < rule.Priority)
                {
                    _rules.Insert(i, rule);
                    return;
                }
            }

            // No items or this is the last priority
            _rules.Add(rule);
        }
コード例 #2
0
 private void VerifySingleRule(ISamplingRule rule, Span span, bool isMatch)
 {
     Assert.Equal(rule.IsMatch(span), isMatch);
 }
コード例 #3
0
 public void RegisterRule(ISamplingRule rule)
 {
 }