Esempio n. 1
0
        internal DefType GetClosestDefType(TypeDesc type)
        {
            if (type.IsArray)
            {
                if (!type.IsArrayTypeWithoutGenericInterfaces())
                {
                    MetadataType arrayShadowType = _arrayOfTType ?? (_arrayOfTType = SystemModule.GetType("System", "Array`1"));
                    return(arrayShadowType.MakeInstantiatedType(((ArrayType)type).ElementType));
                }

                return(GetWellKnownType(WellKnownType.Array));
            }

            Debug.Assert(type is DefType);
            return((DefType)type);
        }
Esempio n. 2
0
 protected override RuntimeInterfacesAlgorithm GetRuntimeInterfacesAlgorithmForNonPointerArrayType(ArrayType type)
 {
     if (_arrayOfTRuntimeInterfacesAlgorithm == null)
     {
         _arrayOfTRuntimeInterfacesAlgorithm = new ArrayOfTRuntimeInterfacesAlgorithm(SystemModule.GetType("System", "Array`1"));
     }
     return(_arrayOfTRuntimeInterfacesAlgorithm);
 }