public Rule getMatchingRule(Qualifier qualifier) { foreach (Rule rule in rules) { if (rule.Matches(null, qualifier)) return rule; } return null; }
public bool Matches(Type type, Qualifier qualifier) { if (typeToBind != null && typeToBind.Equals(type)) return true; if (markedWith != null && markedWith.isMatchedBy(qualifier)) return true; return false; }
public override bool isMatchedBy(Qualifier other) { if (!(other is ParametrizedWithEnumQualifier)) return false; ParametrizedWithEnumQualifier otherQualifier = (ParametrizedWithEnumQualifier)other; return param == otherQualifier.param; }
public abstract bool isMatchedBy(Qualifier other);