System.Runtime.Serialization 4.0.0.0 System.Object

Use the class when you have created a Web service that incorporates data represented by common language runtime (CLR) types and when you need to export XML schemas for each type to be consumed by other Web services. That is, transforms a set of CLR types into XML schemas. (For more information about the types that can be used, see Types Supported by the Data Contract Serializer.) The schemas can then be exposed through a Web Services Description Language (WSDL) document for use by others who need to interoperate with your service.

Conversely, if you are creating a Web service that must interoperate with an existing Web service, use the to transform XML schemas and create the CLR types that represent the data in a selected programming language.

The generates an object that contains the collection of schemas. Access the set of schemas through the property.

To quickly generate XML schema definition (XSD) files that other Web services can consume, use the .

## Exporting Schemas Into an XmlSchemaSet

To create an instance of the class that contains XML schema files, you should be aware of the following.

The set of types you are exporting are recorded as an internal set of data contracts. Thus, you can call the method multiple times to add new types to the schema set without degrading performance because only the new types will be added to the set. During the operation, the existing schemas are compared to the new schemas being added. If there are conflicts, an exception will be thrown. A conflict is usually detected if two types with the same data contract name but different contracts (different members) are exported by the same instance.

## Using the Exporter

A recommended way of using this class is as follows:

Use one of the overloads to determine whether the specified type or set of types can be exported. Use one of the overloads that is appropriate to your requirements.

Call the corresponding method.

Retrieve the schemas from the property.

Allows the transformation of a set of dnprdnshort types that are used in data contracts into an XML schema file (.xsd).

- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

- Constructor
  4.0.0.0

  Use this overload when you have an existing to which you want to add new schemas. After you construct a with this overload, call the method to add new types to the existing set.

  Initializes a new instance of the class with the specified set of schemas.

  An that contains the schemas to be exported.
- Method
  4.0.0.0
  System.Boolean `` To be added.

  Gets a value that indicates whether the set of .common language runtime (CLR) types contained in a set of assemblies can be exported.

  true if the types can be exported; otherwise, false.

  A of that contains the assemblies with the types to export.
- Method
  4.0.0.0
  System.Boolean `` To be added.

  Gets a value that indicates whether the set of .common language runtime (CLR) types contained in a can be exported.

  true if the types can be exported; otherwise, false.

  A that contains the specified types to export.
- Method
  4.0.0.0
  System.Boolean `` To be added.

  Gets a value that indicates whether the specified common language runtime (CLR) type can be exported.

  true if the type can be exported; otherwise, false.

  The to export.
- Method
  4.0.0.0
  System.Void `` To be added.

  Transforms the types contained in the specified collection of assemblies.

  A (of ) that contains the types to export.
- Method
  4.0.0.0
  System.Void `` To be added.

  Transforms the types contained in the passed to this method.

  A (of ) that contains the types to export.
- Method
  4.0.0.0
  System.Void ``

  Call the to determine whether the type can be exported. After calling the method, the schema can be retrieved through the property.

  Transforms the specified dnprdnshort type into an XML schema definition language (XSD) schema.

  The to transform into an XML schema.
- Method
  4.0.0.0
  System.Xml.XmlQualifiedName `` To be added.

  Returns the top-level name and namespace for the .

  The that represents the top-level name and namespace for this , which is written to the stream when writing this object.

  The to query.
- Method
  4.0.0.0
  System.Xml.Schema.XmlSchemaType ``

  The main purpose of this method is to allow anonymous types in XML schema to be represented. Because anonymous types do not have a contract name and namespace, they cannot be looked up using the . This method returns the definition for such types. The types for which the method returns a valid name, this method returns null.

  Returns the XML schema type for the specified type.

  An that contains the XML schema.

  The type to return a schema for.
- Method
  4.0.0.0
  System.Xml.XmlQualifiedName `` To be added.

  Returns the contract name and contract namespace for the .

  An that represents the contract name of the type and its namespace.

  The that was exported.
- Property
  4.0.0.0
  System.Runtime.Serialization.ExportOptions To be added. To be added.

  Gets or sets an that contains options that can be set for the export operation.

- Property
  4.0.0.0
  System.Xml.Schema.XmlSchemaSet To be added. To be added.

  Gets the collection of exported XML schemas.