public override bool Matches(UnitInfo unitInfo)
        {
            var unitType = unitInfo.GetUnitTypeSafe();

            return(unitType != null && unitType.IsGenericType && Equals(unitType.GetGenericTypeDefinition(), UnitInfo.Id));
        }
Beispiel #2
0
 public bool Matches(UnitInfo unitInfo) => unitInfo.Token == SpecialToken.Property && unitInfo.GetUnitTypeSafe() != null;
Beispiel #3
0
 public bool Matches(UnitInfo unitInfo) => unitInfo.Token == SpecialToken.Constructor && unitInfo.GetUnitTypeSafe() != null;
Beispiel #4
0
        public bool Matches(UnitInfo unitInfo)
        {
            var type = unitInfo.GetUnitTypeSafe();

            return(!unitInfo.Token.IsSpecial() && type != null && !type.IsAbstract && !type.IsInterface && !type.IsGenericTypeDefinition);
        }