示例#1
0
 public Rule getMatchingRule(Qualifier qualifier)
 {
     foreach (Rule rule in rules)
     {
         if (rule.Matches(null, qualifier))
             return rule;
     }
     return null;
 }
示例#2
0
文件: Rule.cs 项目: krro/dicontainer
        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;
        }
示例#3
0
 public override bool isMatchedBy(Qualifier other)
 {
     if (!(other is ParametrizedWithEnumQualifier))
         return false;
     ParametrizedWithEnumQualifier otherQualifier = (ParametrizedWithEnumQualifier)other;
     return param == otherQualifier.param;
 }
示例#4
0
 public abstract bool isMatchedBy(Qualifier other);