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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="XmlSchemaGroup.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.Xml.Serialization;
  20.    
  21.     /// <include file='doc\XmlSchemaGroup.uex' path='docs/doc[@for="XmlSchemaGroup"]/*' />
  22.     /// <devdoc>
  23.     /// <para>[To be supplied.]</para>
  24.     /// </devdoc>
  25.     public class XmlSchemaGroup : XmlSchemaAnnotated
  26.     {
  27.         string name;
  28.         XmlSchemaGroupBase particle;
  29.         XmlSchemaParticle canonicalParticle;
  30.         XmlQualifiedName qname = XmlQualifiedName.Empty;
  31.         XmlSchemaGroup redefined;
  32.         int selfReferenceCount;
  33.        
  34.         /// <include file='doc\XmlSchemaGroup.uex' path='docs/doc[@for="XmlSchemaGroup.Name"]/*' />
  35.         /// <devdoc>
  36.         /// <para>[To be supplied.]</para>
  37.         /// </devdoc>
  38.         [XmlAttribute("name")]
  39.         public string Name {
  40.             get { return name; }
  41.             set { name = value; }
  42.         }
  43.        
  44.         /// <include file='doc\XmlSchemaGroup.uex' path='docs/doc[@for="XmlSchemaGroup.Particle"]/*' />
  45.         /// <devdoc>
  46.         /// <para>[To be supplied.]</para>
  47.         /// </devdoc>
  48.         [XmlElement("choice", typeof(XmlSchemaChoice)), XmlElement("all", typeof(XmlSchemaAll)), XmlElement("sequence", typeof(XmlSchemaSequence))]
  49.         public XmlSchemaGroupBase Particle {
  50.             get { return particle; }
  51.             set { particle = value; }
  52.         }
  53.        
  54.         [XmlIgnore()]
  55.         public XmlQualifiedName QualifiedName {
  56.             get { return qname; }
  57.         }
  58.        
  59.         [XmlIgnore()]
  60.         internal XmlSchemaParticle CanonicalParticle {
  61.             get { return canonicalParticle; }
  62.             set { canonicalParticle = value; }
  63.         }
  64.        
  65.         [XmlIgnore()]
  66.         internal XmlSchemaGroup Redefined {
  67.             get { return redefined; }
  68.             set { redefined = value; }
  69.         }
  70.        
  71.         [XmlIgnore()]
  72.         internal int SelfReferenceCount {
  73.             get { return selfReferenceCount; }
  74.             set { selfReferenceCount = value; }
  75.         }
  76.        
  77.         [XmlIgnore()]
  78.         internal override string NameAttribute {
  79.             get { return Name; }
  80.             set { Name = value; }
  81.         }
  82.        
  83.         internal void SetQualifiedName(XmlQualifiedName value)
  84.         {
  85.             qname = value;
  86.         }
  87.        
  88.         internal override XmlSchemaObject Clone()
  89.         {
  90.             XmlSchemaGroup newGroup = (XmlSchemaGroup)MemberwiseClone();
  91.             if (XmlSchemaComplexType.HasParticleRef(this.particle)) {
  92.                 newGroup.particle = XmlSchemaComplexType.CloneParticle(this.particle) as XmlSchemaGroupBase;
  93.             }
  94.             newGroup.canonicalParticle = XmlSchemaParticle.Empty;
  95.             return newGroup;
  96.         }
  97.     }
  98. }

Developer Fusion