Пример #1
0
 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;
 }
Пример #2
0
        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));
        }