internal SchemaImporter(XmlSchemas schemas, CodeGenerationOptions options, CodeDomProvider codeProvider, System.Xml.Serialization.ImportContext context)
 {
     if (!schemas.Contains("http://www.w3.org/2001/XMLSchema"))
     {
         schemas.AddReference(XmlSchemas.XsdSchema);
         schemas.SchemaSet.Add(XmlSchemas.XsdSchema);
     }
     if (!schemas.Contains("http://www.w3.org/XML/1998/namespace"))
     {
         schemas.AddReference(XmlSchemas.XmlSchema);
         schemas.SchemaSet.Add(XmlSchemas.XmlSchema);
     }
     this.schemas = schemas;
     this.options = options;
     this.codeProvider = codeProvider;
     this.context = context;
     this.Schemas.SetCache(this.Context.Cache, this.Context.ShareTypes);
     SchemaImporterExtensionsSection section = System.Configuration.PrivilegedConfigurationManager.GetSection(ConfigurationStrings.SchemaImporterExtensionsSectionPath) as SchemaImporterExtensionsSection;
     if (section != null)
     {
         this.extensions = section.SchemaImporterExtensionsInternal;
     }
     else
     {
         this.extensions = new SchemaImporterExtensionCollection();
     }
 }
Ejemplo n.º 2
0
 public SoapSchemaImporter(XmlSchemas schemas, CodeGenerationOptions options, System.Xml.Serialization.ImportContext context) : base(schemas, options, null, context)
 {
 }
Ejemplo n.º 3
0
        internal SchemaImporter(XmlSchemas schemas, CodeGenerationOptions options, CodeDomProvider codeProvider, System.Xml.Serialization.ImportContext context)
        {
            if (!schemas.Contains("http://www.w3.org/2001/XMLSchema"))
            {
                schemas.AddReference(XmlSchemas.XsdSchema);
                schemas.SchemaSet.Add(XmlSchemas.XsdSchema);
            }
            if (!schemas.Contains("http://www.w3.org/XML/1998/namespace"))
            {
                schemas.AddReference(XmlSchemas.XmlSchema);
                schemas.SchemaSet.Add(XmlSchemas.XmlSchema);
            }
            this.schemas      = schemas;
            this.options      = options;
            this.codeProvider = codeProvider;
            this.context      = context;
            this.Schemas.SetCache(this.Context.Cache, this.Context.ShareTypes);
            SchemaImporterExtensionsSection section = System.Configuration.PrivilegedConfigurationManager.GetSection(ConfigurationStrings.SchemaImporterExtensionsSectionPath) as SchemaImporterExtensionsSection;

            if (section != null)
            {
                this.extensions = section.SchemaImporterExtensionsInternal;
            }
            else
            {
                this.extensions = new SchemaImporterExtensionCollection();
            }
        }