public override bool Matches(UnitInfo unitInfo) { var unitType = unitInfo.GetUnitTypeSafe(); return(unitType != null && unitType.IsGenericType && Equals(unitType.GetGenericTypeDefinition(), UnitInfo.Id)); }
public bool Matches(UnitInfo unitInfo) => unitInfo.Token == SpecialToken.Property && unitInfo.GetUnitTypeSafe() != null;
public bool Matches(UnitInfo unitInfo) => unitInfo.Token == SpecialToken.Constructor && unitInfo.GetUnitTypeSafe() != null;
public bool Matches(UnitInfo unitInfo) { var type = unitInfo.GetUnitTypeSafe(); return(!unitInfo.Token.IsSpecial() && type != null && !type.IsAbstract && !type.IsInterface && !type.IsGenericTypeDefinition); }