2 // System.Xml.Serialization.XmlReflectionMember
\r
5 // Tim Coleman (tim@timcoleman.com)
\r
7 // Copyright (C) Tim Coleman, 2002
\r
11 // Permission is hereby granted, free of charge, to any person obtaining
\r
12 // a copy of this software and associated documentation files (the
\r
13 // "Software"), to deal in the Software without restriction, including
\r
14 // without limitation the rights to use, copy, modify, merge, publish,
\r
15 // distribute, sublicense, and/or sell copies of the Software, and to
\r
16 // permit persons to whom the Software is furnished to do so, subject to
\r
17 // the following conditions:
\r
19 // The above copyright notice and this permission notice shall be
\r
20 // included in all copies or substantial portions of the Software.
\r
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
\r
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
\r
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
\r
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
31 namespace System.Xml.Serialization {
\r
32 public class XmlReflectionMember {
\r
39 bool overrideIsNullable;
\r
40 SoapAttributes soapAttributes;
\r
41 XmlAttributes xmlAttributes;
\r
46 #region Constructors
\r
48 public XmlReflectionMember ()
\r
52 internal XmlReflectionMember (string name, Type type, XmlAttributes attributes)
\r
56 xmlAttributes = attributes;
\r
59 internal XmlReflectionMember (string name, Type type, SoapAttributes attributes)
\r
63 soapAttributes = attributes;
\r
66 #endregion // Constructors
\r
70 public bool IsReturnValue {
\r
71 get { return isReturnValue; }
\r
72 set { isReturnValue = value; }
\r
75 public string MemberName {
\r
76 get { return memberName; }
\r
77 set { memberName = value; }
\r
80 public Type MemberType {
\r
81 get { return memberType; }
\r
82 set { memberType = value; }
\r
85 public bool OverrideIsNullable {
\r
86 get { return overrideIsNullable; }
\r
87 set { overrideIsNullable = value; }
\r
90 public SoapAttributes SoapAttributes {
\r
92 if (soapAttributes == null) soapAttributes = new SoapAttributes();
\r
93 return soapAttributes;
\r
95 set { soapAttributes = value; }
\r
98 public XmlAttributes XmlAttributes {
\r
100 if (xmlAttributes == null) xmlAttributes = new XmlAttributes();
\r
101 return xmlAttributes;
\r
103 set { xmlAttributes = value; }
\r
106 internal Type DeclaringType {
\r
107 get { return declaringType; }
\r
108 set { declaringType = value; }
\r
111 internal void AddKeyHash (System.Text.StringBuilder sb)
\r
113 sb.Append ("XRM ");
\r
114 KeyHelper.AddField (sb, 1, isReturnValue);
\r
115 KeyHelper.AddField (sb, 1, memberName);
\r
116 KeyHelper.AddField (sb, 1, memberType);
\r
117 KeyHelper.AddField (sb, 1, overrideIsNullable);
\r
119 if (soapAttributes != null)
\r
120 soapAttributes.AddKeyHash (sb);
\r
122 if (xmlAttributes != null)
\r
123 xmlAttributes.AddKeyHash (sb);
\r
128 #endregion // Properties
\r