internal SchemaImporter(XmlSchemas schemas, CodeGenerationOptions options, CodeDomProvider codeProvider, ImportContext context) { if (!schemas.Contains(XmlSchema.Namespace)) { schemas.AddReference(XmlSchemas.XsdSchema); schemas.SchemaSet.Add(XmlSchemas.XsdSchema); } if (!schemas.Contains(XmlReservedNs.NsXml)) { schemas.AddReference(XmlSchemas.XmlSchema); schemas.SchemaSet.Add(XmlSchemas.XmlSchema); } _schemas = schemas; _options = options; _codeProvider = codeProvider; _context = context; Schemas.SetCache(Context.Cache, Context.ShareTypes); _extensions = new SchemaImporterExtensionCollection(); }