Exemple #1
0
 /// <summary>
 /// Creates and returns the CLR <see cref="Type"/>.
 /// </summary>
 /// <returns>Creates and returns the CLR <see cref="Type"/>.</returns>
 protected virtual Type CreateClrType()
 {
     if (!IsGeneric)
     {
         return(RepresentedType);
     }
     return(RepresentedType.MakeGenericType(GenericArguments.Select(arg => (Type)arg.GetClrVersion()).ToArray()));
 }
Exemple #2
0
        /// <summary>
        /// Creates and returns the CLR <see cref="Type"/>.
        /// </summary>
        /// <returns>Creates and returns the CLR <see cref="Type"/>.</returns>
        protected virtual Type CreateClrType()
        {
            if (!IsGeneric)
            {
                return(RepresentedType);
            }
#if !NETFX_CORE
            return(RepresentedType.MakeGenericType(GenericArguments.Select(arg => (Type)arg.GetClrVersion()).ToArray()));
#else
            return(RepresentedType.MakeGenericType(GenericArguments.Select(arg => ((TypeInfo)arg.GetClrVersion()).AsType()).ToArray()));
#endif
        }