private static void ProcessUnresolvedTypes(ITypeRegistry typeRegistry) { foreach (TypeReference unresolvedType in typeRegistry.GetUnresolvedTypes()) { if (IsObjectType(unresolvedType)) { typeRegistry.RegisterType( new TypeReference(typeof(ObjectType <>) .MakeGenericType(unresolvedType.ClrType))); } else if (IsInputObjectType(unresolvedType)) { typeRegistry.RegisterType( new TypeReference(typeof(InputObjectType <>) .MakeGenericType(unresolvedType.ClrType))); } else if (IsEnumType(unresolvedType)) { typeRegistry.RegisterType( new TypeReference(typeof(EnumType <>) .MakeGenericType(unresolvedType.ClrType))); } } }
private void ProcessUnresolvedTypes(ITypeRegistry typeRegistry) { foreach (Type type in typeRegistry.GetUnresolvedTypes()) { if (type.IsClass && !type.IsAbstract && (type.IsPublic || type.IsNestedPublic)) { typeRegistry.RegisterType( new TypeReference(typeof(ObjectType <>) .MakeGenericType(type))); } else if (type.IsEnum && (type.IsPublic || type.IsNestedPublic)) { typeRegistry.RegisterType( new TypeReference(typeof(EnumType <>) .MakeGenericType(type))); } } }