IsTypeSpecification() статический приватный Метод

static private IsTypeSpecification ( Type type ) : bool
type System.Type
Результат bool
Пример #1
0
        public TypeReference ImportType(Type type, ImportGenericContext context, ImportGenericKind import_kind)
        {
            if (MetadataImporter.IsTypeSpecification(type) || MetadataImporter.ImportOpenGenericType(type, import_kind))
            {
                return(this.ImportTypeSpecification(type, context));
            }
            TypeReference typeReference = new TypeReference(string.Empty, type.Name, this.module, this.ImportScope(type.Assembly), type.IsValueType)
            {
                etype = MetadataImporter.ImportElementType(type)
            };

            if (!MetadataImporter.IsNestedType(type))
            {
                typeReference.Namespace = type.Namespace ?? string.Empty;
            }
            else
            {
                typeReference.DeclaringType = this.ImportType(type.DeclaringType, context, import_kind);
            }
            if (type.IsGenericType)
            {
                MetadataImporter.ImportGenericParameters(typeReference, type.GetGenericArguments());
            }
            return(typeReference);
        }