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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="XmlSchemaIdentityConstraint.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.ComponentModel;
  21.     using System.Xml.Serialization;
  22.    
  23.     /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaIdentityConstraint"]/*' />
  24.     /// <devdoc>
  25.     /// <para>[To be supplied.]</para>
  26.     /// </devdoc>
  27.     public class XmlSchemaIdentityConstraint : XmlSchemaAnnotated
  28.     {
  29.         string name;
  30.         XmlSchemaXPath selector;
  31.         XmlSchemaObjectCollection fields = new XmlSchemaObjectCollection();
  32.         XmlQualifiedName qualifiedName = XmlQualifiedName.Empty;
  33.         CompiledIdentityConstraint compiledConstraint = null;
  34.        
  35.         /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaIdentityConstraint.Name"]/*' />
  36.         /// <devdoc>
  37.         /// <para>[To be supplied.]</para>
  38.         /// </devdoc>
  39.         [XmlAttribute("name")]
  40.         public string Name {
  41.             get { return name; }
  42.             set { name = value; }
  43.         }
  44.        
  45.         /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaIdentityConstraint.Selector"]/*' />
  46.         /// <devdoc>
  47.         /// <para>[To be supplied.]</para>
  48.         /// </devdoc>
  49.         [XmlElement("selector", typeof(XmlSchemaXPath))]
  50.         public XmlSchemaXPath Selector {
  51.             get { return selector; }
  52.             set { selector = value; }
  53.         }
  54.        
  55.         /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaIdentityConstraint.Fields"]/*' />
  56.         /// <devdoc>
  57.         /// <para>[To be supplied.]</para>
  58.         /// </devdoc>
  59.         [XmlElement("field", typeof(XmlSchemaXPath))]
  60.         public XmlSchemaObjectCollection Fields {
  61.             get { return fields; }
  62.         }
  63.        
  64.         /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaIdentityConstraint.QualifiedName"]/*' />
  65.         /// <devdoc>
  66.         /// <para>[To be supplied.]</para>
  67.         /// </devdoc>
  68.         [XmlIgnore()]
  69.         public XmlQualifiedName QualifiedName {
  70.             get { return qualifiedName; }
  71.         }
  72.        
  73.         internal void SetQualifiedName(XmlQualifiedName value)
  74.         {
  75.             qualifiedName = value;
  76.         }
  77.        
  78.         [XmlIgnore()]
  79.         internal CompiledIdentityConstraint CompiledConstraint {
  80.             get { return compiledConstraint; }
  81.             set { compiledConstraint = value; }
  82.         }
  83.        
  84.         [XmlIgnore()]
  85.         internal override string NameAttribute {
  86.             get { return Name; }
  87.             set { Name = value; }
  88.         }
  89.     }
  90.    
  91.     /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaXPath"]/*' />
  92.     /// <devdoc>
  93.     /// <para>[To be supplied.]</para>
  94.     /// </devdoc>
  95.     public class XmlSchemaXPath : XmlSchemaAnnotated
  96.     {
  97.         string xpath;
  98.         /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaXPath.XPath"]/*' />
  99.         /// <devdoc>
  100.         /// <para>[To be supplied.]</para>
  101.         /// </devdoc>
  102.         [XmlAttribute("xpath"), DefaultValue("")]
  103.         public string XPath {
  104.             get { return xpath; }
  105.             set { xpath = value; }
  106.         }
  107.     }
  108.    
  109.     /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaUnique"]/*' />
  110.     /// <devdoc>
  111.     /// <para>[To be supplied.]</para>
  112.     /// </devdoc>
  113.     public class XmlSchemaUnique : XmlSchemaIdentityConstraint
  114.     {
  115.     }
  116.    
  117.     /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaKey"]/*' />
  118.     /// <devdoc>
  119.     /// <para>[To be supplied.]</para>
  120.     /// </devdoc>
  121.     public class XmlSchemaKey : XmlSchemaIdentityConstraint
  122.     {
  123.     }
  124.    
  125.     /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaKeyref"]/*' />
  126.     /// <devdoc>
  127.     /// <para>[To be supplied.]</para>
  128.     /// </devdoc>
  129.     public class XmlSchemaKeyref : XmlSchemaIdentityConstraint
  130.     {
  131.         XmlQualifiedName refer = XmlQualifiedName.Empty;
  132.        
  133.         /// <include file='doc\XmlSchemaIdentityConstraint.uex' path='docs/doc[@for="XmlSchemaKeyref.Refer"]/*' />
  134.         /// <devdoc>
  135.         /// <para>[To be supplied.]</para>
  136.         /// </devdoc>
  137.         [XmlAttribute("refer")]
  138.         public XmlQualifiedName Refer {
  139.             get { return refer; }
  140.             set { refer = (value == null ? XmlQualifiedName.Empty : value); }
  141.         }
  142.     }
  143. }

Developer Fusion