Share via


XmlSchemaSet.Schemas Yöntem

Tanım

içinde XML Şema tanım dili (XSD) şemaları XmlSchemaSetkoleksiyonunu döndürür.

Aşırı Yüklemeler

Schemas()

içindeki tüm XML Şema tanım dili (XSD) şemalarından XmlSchemaSetoluşan bir koleksiyon döndürür.

Schemas(String)

Verilen ad alanına ait olan içindeki tüm XML Şeması tanım dili (XSD) şemalarından XmlSchemaSet oluşan bir koleksiyon döndürür.

Schemas()

Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs

içindeki tüm XML Şema tanım dili (XSD) şemalarından XmlSchemaSetoluşan bir koleksiyon döndürür.

public:
 System::Collections::ICollection ^ Schemas();
public System.Collections.ICollection Schemas ();
member this.Schemas : unit -> System.Collections.ICollection
Public Function Schemas () As ICollection

Döndürülenler

ICollection öğesine eklenmiş XmlSchemaSetolan tüm şemaları içeren bir nesne. öğesine XmlSchemaSethiç şema eklenmemişse boş ICollection bir nesne döndürülür.

Örnekler

Aşağıdaki örnekte içindeki tüm şemalar üzerinde nasıl yinelenir gösterilmektedir XmlSchemaSet.

Dim schemaSet As XmlSchemaSet = New XmlSchemaSet
schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd")

Dim schema As XmlSchema

For Each schema In schemaSet.Schemas()

    schema.Write(Console.Out)

Next
XmlSchemaSet schemaSet = new XmlSchemaSet();
schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd");

foreach (XmlSchema schema in schemaSet.Schemas())
{
    schema.Write(Console.Out);
}

Açıklamalar

Bu yöntem, içeri aktarıldıkları için öğesine dolaylı olarak XmlSchemaSet eklenen şemaları döndürür.

Not

Schemas yöntemi, eski XmlSchemaCollectionyönteminin eşdeğeridirGetEnumerator.

Şunlara uygulanır

Schemas(String)

Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs

Verilen ad alanına ait olan içindeki tüm XML Şeması tanım dili (XSD) şemalarından XmlSchemaSet oluşan bir koleksiyon döndürür.

public:
 System::Collections::ICollection ^ Schemas(System::String ^ targetNamespace);
public System.Collections.ICollection Schemas (string? targetNamespace);
public System.Collections.ICollection Schemas (string targetNamespace);
member this.Schemas : string -> System.Collections.ICollection
Public Function Schemas (targetNamespace As String) As ICollection

Parametreler

targetNamespace
String

Şema targetNamespace özelliği.

Döndürülenler

ICollection Verilen ad alanına ait olan öğesine XmlSchemaSet eklenmiş olan tüm şemaları içeren bir nesne. öğesine XmlSchemaSethiç şema eklenmemişse boş ICollection bir nesne döndürülür.

Örnekler

Aşağıdaki örnekte, içindeki ad alanında http://www.contoso.com/books yer alan tüm şemaların nasıl yinelenir olduğu gösterilmektedir XmlSchemaSet.

Dim schemaSet As XmlSchemaSet = New XmlSchemaSet
schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd")

Dim schema As XmlSchema

For Each schema In schemaSet.Schemas("http://www.contoso.com/books")

    schema.Write(Console.Out)

Next
XmlSchemaSet schemaSet = new XmlSchemaSet();
schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd");

foreach (XmlSchema schema in schemaSet.Schemas("http://www.contoso.com/books"))
{
    schema.Write(Console.Out);
}

Açıklamalar

targetNamespace parametresi veya Emptyisenull, ad alanı olmayan tüm şemalar döndürülür.

Bu yöntem, içeri aktarıldıkları için öğesine dolaylı olarak XmlSchemaSet eklenen şemaları döndürür.

Not

Schemas yöntemi, eski XmlSchemaCollectionyönteminin eşdeğeridirItem[].

Şunlara uygulanır