The Labs \ Source Viewer \ SSCLI \ System.Xml.Schema \ XmlSchemaSimpleTypeRestriction

  1. //------------------------------------------------------------------------------
  2. // <copyright file="XmlSchemaSimpleTypeRestriction.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. // <owner current="true" primary="true">priyal</owner>
  15. //------------------------------------------------------------------------------
  16. namespace System.Xml.Schema
  17. {
  18.    
  19.     using System.Collections;
  20.     using System.Xml.Serialization;
  21.    
  22.     /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction"]/*' />
  23.     /// <devdoc>
  24.     /// <para>[To be supplied.]</para>
  25.     /// </devdoc>
  26.     public class XmlSchemaSimpleTypeRestriction : XmlSchemaSimpleTypeContent
  27.     {
  28.         XmlQualifiedName baseTypeName = XmlQualifiedName.Empty;
  29.         XmlSchemaSimpleType baseType;
  30.         XmlSchemaObjectCollection facets = new XmlSchemaObjectCollection();
  31.        
  32.         /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction.BaseTypeName"]/*' />
  33.         /// <devdoc>
  34.         /// <para>[To be supplied.]</para>
  35.         /// </devdoc>
  36.         [XmlAttribute("base")]
  37.         public XmlQualifiedName BaseTypeName {
  38.             get { return baseTypeName; }
  39.             set { baseTypeName = (value == null ? XmlQualifiedName.Empty : value); }
  40.         }
  41.        
  42.         /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction.BaseType"]/*' />
  43.         /// <devdoc>
  44.         /// <para>[To be supplied.]</para>
  45.         /// </devdoc>
  46.         [XmlElement("simpleType", typeof(XmlSchemaSimpleType))]
  47.         public XmlSchemaSimpleType BaseType {
  48.             get { return baseType; }
  49.             set { baseType = value; }
  50.         }
  51.        
  52.         /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction.Facets"]/*' />
  53.         /// <devdoc>
  54.         /// <para>[To be supplied.]</para>
  55.         /// </devdoc>
  56.         [XmlElement("length", typeof(XmlSchemaLengthFacet)), XmlElement("minLength", typeof(XmlSchemaMinLengthFacet)), XmlElement("maxLength", typeof(XmlSchemaMaxLengthFacet)), XmlElement("pattern", typeof(XmlSchemaPatternFacet)), XmlElement("enumeration", typeof(XmlSchemaEnumerationFacet)), XmlElement("maxInclusive", typeof(XmlSchemaMaxInclusiveFacet)), XmlElement("maxExclusive", typeof(XmlSchemaMaxExclusiveFacet)), XmlElement("minInclusive", typeof(XmlSchemaMinInclusiveFacet)), XmlElement("minExclusive", typeof(XmlSchemaMinExclusiveFacet)), XmlElement("totalDigits", typeof(XmlSchemaTotalDigitsFacet)), XmlElement("fractionDigits", typeof(XmlSchemaFractionDigitsFacet)), XmlElement("whiteSpace", typeof(XmlSchemaWhiteSpaceFacet))]
  57.         public XmlSchemaObjectCollection Facets {
  58.             get { return facets; }
  59.         }
  60.        
  61.         internal override XmlSchemaObject Clone()
  62.         {
  63.             XmlSchemaSimpleTypeRestriction newRestriction = (XmlSchemaSimpleTypeRestriction)MemberwiseClone();
  64.             newRestriction.BaseTypeName = baseTypeName.Clone();
  65.             return newRestriction;
  66.         }
  67.     }
  68. }

Developer Fusion