Example #1
0
        public static Type GetInnerMostType(this IIOContainer pinContainer)
        {
            var type = pinContainer.GetType();

            while (type.GenericTypeArguments.Length > 0)
            {
                type = type.GenericTypeArguments[0];
            }

            return(type);
        }
Example #2
0
        public static TypeRecord GetTypeRecord(this IIOContainer pinContainer)
        {
            var type = pinContainer.GetType();

            while (type.GenericTypeArguments.Length > 0)
            {
                type = type.GenericTypeArguments[0];
                if (TypeIdentity.Instance.ContainsKey(type))
                {
                    return(TypeIdentity.Instance[type]);
                }
            }

            return(null);
        }