public bool MatchesConstraint(IType type) { bool result = type.InheritsFrom(RequiredType); return Invert ? !result : result; }