/// <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); }
private void VerifySingleRule(ISamplingRule rule, Span span, bool isMatch) { Assert.Equal(rule.IsMatch(span), isMatch); }
public void RegisterRule(ISamplingRule rule) { }