public TypeInfoMatchTarget(TypeLib typeLib, TypeInfo typeInfo, TYPEKIND typeKind) { m_typeLib = typeLib; m_typeInfo = typeInfo; m_typeKind = typeKind; m_typeString = TypeLibUtility.TypeKind2String(m_typeKind); m_guid = typeInfo.GetTypeAttr().Guid; }
public override bool Match(IMatchTarget matchTarget) { TYPEKIND typeKind; if (matchTarget is TypeInfoMatchTarget) { TypeInfoMatchTarget typeInfoMatchTarget = matchTarget as TypeInfoMatchTarget; typeKind = typeInfoMatchTarget.TypeKind; } else { throw new CannotApplyConditionToMatchTargetException(this, matchTarget); } return(m_operator.IsTrue(TypeLibUtility.TypeKind2String(typeKind), m_value)); }