9e4e15769c88df6a323a71c8f40a70ecd8b8ec2f
[mono.git] / mcs / class / referencesource / System.Xml / System / Xml / Schema / XmlSchemaChoice.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="XmlSchemaChoice.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>                                                                
5 // <owner current="true" primary="true">Microsoft</owner>                                                               
6 //------------------------------------------------------------------------------
7
8 namespace System.Xml.Schema {
9
10     using System.Collections;
11     using System.Xml.Serialization;
12
13     /// <include file='doc\XmlSchemaChoice.uex' path='docs/doc[@for="XmlSchemaChoice"]/*' />
14     /// <devdoc>
15     ///    <para>[To be supplied.]</para>
16     /// </devdoc>
17     public class XmlSchemaChoice : XmlSchemaGroupBase {
18         XmlSchemaObjectCollection items = new XmlSchemaObjectCollection();
19
20         /// <include file='doc\XmlSchemaChoice.uex' path='docs/doc[@for="XmlSchemaChoice.Items"]/*' />
21         /// <devdoc>
22         ///    <para>[To be supplied.]</para>
23         /// </devdoc>
24         [XmlElement("element", typeof(XmlSchemaElement)),
25          XmlElement("group", typeof(XmlSchemaGroupRef)),
26          XmlElement("choice", typeof(XmlSchemaChoice)),
27          XmlElement("sequence", typeof(XmlSchemaSequence)),
28          XmlElement("any", typeof(XmlSchemaAny))]
29         public override XmlSchemaObjectCollection Items {
30             get { return items; }
31         }
32
33         internal override bool IsEmpty {
34             get { return  base.IsEmpty /*|| items.Count == 0*/; }
35         }
36         
37         internal override void SetItems(XmlSchemaObjectCollection newItems) {
38             items = newItems;
39         }
40     }
41 }