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