예제 #1
0
        public bool IsDefined(IType attributeType)
        {
            ExternalType type = attributeType as ExternalType;

            if (null == type)
            {
                return(false);
            }
            return(MetadataUtil.IsAttributeDefined(_type, type.ActualType));
        }
예제 #2
0
        public virtual bool IsSubclassOf(IType other)
        {
            ExternalType external = other as ExternalType;

            if (null == external /*|| _typeSystemServices.VoidType == other*/)
            {
                return(false);
            }

            return(_type.IsSubclassOf(external._type) ||
                   (external.IsInterface && external._type.IsAssignableFrom(_type))
                   );
        }
예제 #3
0
        public virtual bool IsAssignableFrom(IType other)
        {
            ExternalType external = other as ExternalType;

            if (null == external)
            {
                if (EntityType.Null == other.EntityType)
                {
                    return(!IsValueType);
                }
                return(other.IsSubclassOf(this));
            }
            if (other == _provider.Map(Types.Void))
            {
                return(false);
            }
            return(_type.IsAssignableFrom(external._type));
        }