Aracılığıyla paylaş


XmlSchema.Includes Özellik

Tanım

Eklenen ve içeri aktarılan şemaların koleksiyonunu alır.

public:
 property System::Xml::Schema::XmlSchemaObjectCollection ^ Includes { System::Xml::Schema::XmlSchemaObjectCollection ^ get(); };
public System.Xml.Schema.XmlSchemaObjectCollection Includes { get; }
member this.Includes : System.Xml.Schema.XmlSchemaObjectCollection
Public ReadOnly Property Includes As XmlSchemaObjectCollection

Özellik Değeri

Dahil edilen ve içeri aktarılan şemalardan biri XmlSchemaObjectCollection .

Açıklamalar

Add yöntemi yalnızca XmlSchemaExternal ve türetilmiş türlerini (XmlSchemaImport, XmlSchemaIncludeve XmlSchemaRedefine) parametre olarak bekler. Aşağıdaki örnekte, mevcut XmlSchema bir nesnenin koleksiyonuna Includes eklenen şemanın eklenmesi gösterilmektedir.

Dim schema As XmlSchema = New XmlSchema()

Dim textReader As XmlTextReader = New XmlTextReader("include.xsd")
Dim includeSchema As XmlSchema = XmlSchema.Read(textReader, null)

Dim include As XmlSchemaInclude = New XmlSchemaInclude()
include.Schema = includeSchema;
schema.Includes.Add(include);
XmlSchema schema = new XmlSchema();

XmlTextReader textReader = new XmlTextReader("include.xsd");
XmlSchema includeSchema = XmlSchema.Read(textReader, null);

XmlSchemaInclude include = new XmlSchemaInclude();
include.Schema = includeSchema;
schema.Includes.Add(include);

Şunlara uygulanır