コード例 #1
0
        internal bool IsAssignableFrom(CrossType b)
        {
#if NET40
            return(_Type.IsAssignableFrom(b._Type));
#else
            return(_Info.IsAssignableFrom(b._Info));
#endif
        }
コード例 #2
0
            public Match(CrossType a, CrossType b, TypeInfo viewType)
            {
                Rank = 0;
                if (a.IsGenericTypeDefinition)
                {
                    Rank = 1;
                    if (b.IsGenericType)
                    {
                        a = a.MakeGenericType(b.GetGenericArguments());
                    }
                }

                if (a.IsAssignableFrom(b))
                {
                    Type = viewType;
                }
            }