通过


XsdDataContractExporter.Export 方法

定义

将公共语言运行时 (CLR) 类型或类型集转换为一组 XML 架构。

重载

名称 说明
Export(ICollection<Assembly>)

转换指定程序集集合中包含的类型。

Export(ICollection<Type>)

转换传递给此方法时 ICollection<T> 所包含的类型。

Export(Type)

将指定的 .NET 类型转换为 XML 架构定义语言 (XSD) 架构。

注解

作为建议的做法,请使用其中一个 CanExport 重载来确定是否可以导出指定的类型或类型集。

调用 Export 该方法后,从 Schemas 属性中检索架构。

Export(ICollection<Assembly>)

Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs

转换指定程序集集合中包含的类型。

public:
 void Export(System::Collections::Generic::ICollection<System::Reflection::Assembly ^> ^ assemblies);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public void Export(System.Collections.Generic.ICollection<System.Reflection.Assembly> assemblies);
public void Export(System.Collections.Generic.ICollection<System.Reflection.Assembly> assemblies);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public void Export(System.Collections.Generic.ICollection<System.Reflection.Assembly> assemblies);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
member this.Export : System.Collections.Generic.ICollection<System.Reflection.Assembly> -> unit
member this.Export : System.Collections.Generic.ICollection<System.Reflection.Assembly> -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
member this.Export : System.Collections.Generic.ICollection<System.Reflection.Assembly> -> unit
Public Sub Export (assemblies As ICollection(Of Assembly))

参数

assemblies
ICollection<Assembly>

包含要导出的类型的 / >。

属性

例外

参数 assembliesnull.

Assembly集合中为 null.

适用于

Export(ICollection<Type>)

Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs

转换传递给此方法时 ICollection<T> 所包含的类型。

public:
 void Export(System::Collections::Generic::ICollection<Type ^> ^ types);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public void Export(System.Collections.Generic.ICollection<Type> types);
public void Export(System.Collections.Generic.ICollection<Type> types);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public void Export(System.Collections.Generic.ICollection<Type> types);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
member this.Export : System.Collections.Generic.ICollection<Type> -> unit
member this.Export : System.Collections.Generic.ICollection<Type> -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
member this.Export : System.Collections.Generic.ICollection<Type> -> unit
Public Sub Export (types As ICollection(Of Type))

参数

types
ICollection<Type>

包含要导出的类型的 / >。

属性

例外

参数 typesnull.

集合中的类型为 null.

适用于

Export(Type)

Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs
Source:
XsdDataContractExporter.cs

将指定的 .NET 类型转换为 XML 架构定义语言 (XSD) 架构。

public:
 void Export(Type ^ type);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public void Export(Type type);
public void Export(Type type);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public void Export(Type type);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
member this.Export : Type -> unit
member this.Export : Type -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
member this.Export : Type -> unit
Public Sub Export (type As Type)

参数

type
Type

Type要转换为 XML 架构。

属性

例外

参数 typenull.

注解

调用 CanExport 以确定是否可以导出类型。 调用 Export 该方法后,可以通过属性检索 Schemas 架构。

适用于