XmlSchemas.Compile(ValidationEventHandler, Boolean) Metode

Definisi

Memproses elemen dan nama atribut dalam skema XML dan, secara opsional, memvalidasi skema XML.

API ini mendukung infrastruktur produk dan tidak dimaksudkan untuk digunakan langsung dari kode Anda.

public:
 void Compile(System::Xml::Schema::ValidationEventHandler ^ handler, bool fullCompile);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("XML serializer relies on dynamic code generation which is not available with Ahead of Time compilation")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Members from serialized types may be trimmed if not referenced directly")]
public void Compile(System.Xml.Schema.ValidationEventHandler? handler, bool fullCompile);
public void Compile(System.Xml.Schema.ValidationEventHandler? handler, bool fullCompile);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Members from serialized types may be trimmed if not referenced directly")]
public void Compile(System.Xml.Schema.ValidationEventHandler? handler, bool fullCompile);
public void Compile(System.Xml.Schema.ValidationEventHandler handler, bool fullCompile);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("XML serializer relies on dynamic code generation which is not available with Ahead of Time compilation")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Members from serialized types may be trimmed if not referenced directly")>]
member this.Compile : System.Xml.Schema.ValidationEventHandler * bool -> unit
member this.Compile : System.Xml.Schema.ValidationEventHandler * bool -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Members from serialized types may be trimmed if not referenced directly")>]
member this.Compile : System.Xml.Schema.ValidationEventHandler * bool -> unit
Public Sub Compile (handler As ValidationEventHandler, fullCompile As Boolean)

Parameter

handler
ValidationEventHandler

ValidationEventHandler Yang menentukan metode panggilan balik yang menangani kesalahan dan peringatan selama validasi Skema XML, jika parameter ketat diatur ke true.

fullCompile
Boolean

true untuk memvalidasi skema XML dalam koleksi menggunakan Compile(ValidationEventHandler, Boolean) metode XmlSchemas kelas; jika tidak, false.

Atribut

Keterangan

Daftar berikut mengidentifikasi situasi di mana metode dipanggil Compile :

  • ServiceDescriptionReflector Menurut kelas saat membuat ServiceDescription objek dari kelas yang diidentifikasi sebagai layanan Web.

  • Dengan alat Wsdl.exe atau ServiceDescriptionImporter kelas, saat membuat kelas proksi klien atau kelas server abstrak dari dokumen Web Services Description Language (WSDL).

  • Dengan alat Xsd.exe saat menghasilkan skema XML dari jenis yang ditemukan dalam rakitan.

Alih-alih memanggil metode secara Compile langsung, gunakan kelas atau alat yang disebutkan sebelumnya.

Berlaku untuk