Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System.Xml / System / Xml / Schema / XmlSchemaSimpleTypeRestriction.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="XmlSchemaSimpleTypeRestriction.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 // <owner current="true" primary="true">[....]</owner> 
6 //------------------------------------------------------------------------------
7
8 namespace System.Xml.Schema {
9
10     using System.Collections;
11     using System.Xml.Serialization;
12
13     /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction"]/*' />
14     /// <devdoc>
15     ///    <para>[To be supplied.]</para>
16     /// </devdoc>
17     public class XmlSchemaSimpleTypeRestriction : XmlSchemaSimpleTypeContent {
18         XmlQualifiedName baseTypeName = XmlQualifiedName.Empty;
19         XmlSchemaSimpleType baseType;
20         XmlSchemaObjectCollection facets = new XmlSchemaObjectCollection();
21
22         /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction.BaseTypeName"]/*' />
23         /// <devdoc>
24         ///    <para>[To be supplied.]</para>
25         /// </devdoc>
26         [XmlAttribute("base")]
27         public XmlQualifiedName BaseTypeName {
28             get { return baseTypeName; }
29             set { baseTypeName = (value == null ? XmlQualifiedName.Empty : value); }
30         }
31
32         /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction.BaseType"]/*' />
33         /// <devdoc>
34         ///    <para>[To be supplied.]</para>
35         /// </devdoc>
36         [XmlElement("simpleType", typeof(XmlSchemaSimpleType))]
37         public XmlSchemaSimpleType BaseType {
38             get { return baseType; }
39             set { baseType = value; }
40         }
41
42         /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction.Facets"]/*' />
43         /// <devdoc>
44         ///    <para>[To be supplied.]</para>
45         /// </devdoc>
46         [XmlElement("length", typeof(XmlSchemaLengthFacet)),
47          XmlElement("minLength", typeof(XmlSchemaMinLengthFacet)),
48          XmlElement("maxLength", typeof(XmlSchemaMaxLengthFacet)),
49          XmlElement("pattern", typeof(XmlSchemaPatternFacet)),
50          XmlElement("enumeration", typeof(XmlSchemaEnumerationFacet)),
51          XmlElement("maxInclusive", typeof(XmlSchemaMaxInclusiveFacet)),
52          XmlElement("maxExclusive", typeof(XmlSchemaMaxExclusiveFacet)),
53          XmlElement("minInclusive", typeof(XmlSchemaMinInclusiveFacet)),
54          XmlElement("minExclusive", typeof(XmlSchemaMinExclusiveFacet)),
55          XmlElement("totalDigits", typeof(XmlSchemaTotalDigitsFacet)),
56          XmlElement("fractionDigits", typeof(XmlSchemaFractionDigitsFacet)),
57          XmlElement("whiteSpace", typeof(XmlSchemaWhiteSpaceFacet))]
58         public XmlSchemaObjectCollection Facets {
59             get { return facets; }
60         }
61
62         internal override XmlSchemaObject Clone() {
63             XmlSchemaSimpleTypeRestriction newRestriction = (XmlSchemaSimpleTypeRestriction)MemberwiseClone();
64             newRestriction.BaseTypeName = baseTypeName.Clone();
65             return newRestriction;
66         }
67     }
68 }
69