System.Xml
2.0.0.0
4.0.0.0
System.Object
Schema importation occurs whenever a Web service proxy is produced through a tool such as the Add Web Reference dialog box found in Visual Studio, or by using the Web Services Description Language Tool (Wsdl.exe). Schema importation also occurs when using the XML Schema Definition Tool (Xsd.exe) to generate code from a specific XSD document.
The class allows you to modify the code generated when using any of these tools. For example, you may have an existing class that processes book orders on a system and you have an existing XSD document that supplies your orders. Using the class, you can enable one of the tools to generate code that uses your class.
In order to control the generation of the code, you must use the classes found in the namespace. For more information, see Using the CodeDOM and CodeDOM Quick Reference.
The steps to enabling the WSDL.exe tool (which in turn is used by other tools such as the Add Web Reference dialog box) to use your extension are:
-
Create an implementation of the class.
-
Use the method to write code for the code generator. The method contains parameters that allow you to examine the intercepted XSD type and create CodeDOM objects that are used to generate the new CLR code.
-
If required, use the method to handle <xsd:any> elements found in the XSD document.
-
If required, use the method to examine default values found in the XSD document and return a different default value.
-
Compile your extension into a library.
-
Sign the assembly.
-
Install the assembly in the Global Assembly Cache (GAC).
-
Modify the machine.config file to include the extension.
Allows you to customize the code generated from a Web Services Description Language (WSDL) document when using automated query tools.
Constructor
2.0.0.0
4.0.0.0
To be added.
Initializes a new instance of the class.
Method
2.0.0.0
4.0.0.0
System.String
In order to control the generation of the code, you must use the classes found in the namespace. For more information, see Using the CodeDOM and CodeDOM Quick Reference.
Handles the importation of the <xsd:any> elements in the schema.
The name of the CLR type that the element maps to.
An that represents the xsd:any element found in the XML Schema Document (XSD).
A that indicates whether the XSD complex attribute has been set to "mixed". true, if the attribute has been set to mixed, otherwise false.
An that contains the collection of schemas found in the XSD.
The that is the importer being used.
A to which you can add CodeDOM structures to generate alternative code for the XSD.
A that represents the current namespace for the element.
A for the setting options on the code compiler.
A that is the CodeDOM provider used to generate the new code.
Method
2.0.0.0
4.0.0.0
System.CodeDom.CodeExpression
In order to control the generation of the code, you must use the classes found in the namespace. For more information, see Using the CodeDOM and CodeDOM Quick Reference.
Allows you to specify the default value for the XSD type being imported.
A setting the new default value.
The value found in the original XSD.
The XSD type name.
Method
2.0.0.0
4.0.0.0
System.String
To be added.
Allows you to manipulate the code generated by examining the imported schema and specifying the CLR type that it maps to.
The name of the CLR type that this maps to.
An that represents the XSD type.
An that represents schema information, such as the line number of the XML element.
An that contains the collection of schemas in the document.
The that is the importer being used.
A to which you can add CodeDOM structures to generate alternative code for the XSD.
A that represents the current namespace for the element.
A for the setting options on the code compiler.
A that is used to generate the new code.
Method
2.0.0.0
4.0.0.0
System.String
In order to control the generation of the code, you must use the classes found in the namespace. For more information, see Using the CodeDOM and CodeDOM Quick Reference.
Allows you to manipulate the code generated by examining the imported schema and specifying the CLR type that it maps to.
The name of the CLR type that this maps to.
The name of the element.
The namespace of the element.
An that represents schema information, such as the line number of the XML element.
An that contains the collection of schemas in the document.
The that is the importer being used.
A to which you can add CodeDOM structures to generate alternative code for the XSD.
A that represents the current namespace for the element.
A for the setting options on the code compiler.
A that is used to generate the new code.