The Labs \ Source Viewer \ SSCLI \ System.Xml.Serialization \ XmlAttributeAttribute

  1. //------------------------------------------------------------------------------
  2. // <copyright file="XmlAttributeAttribute.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">ElenaK</owner>
  15. //------------------------------------------------------------------------------
  16. namespace System.Xml.Serialization
  17. {
  18.    
  19.     using System;
  20.     using System.Xml.Schema;
  21.    
  22.     /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute"]/*' />
  23.     /// <devdoc>
  24.     /// <para>[To be supplied.]</para>
  25.     /// </devdoc>
  26.     [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
  27.     public class XmlAttributeAttribute : System.Attribute
  28.     {
  29.         string attributeName;
  30.         Type type;
  31.         string ns;
  32.         string dataType;
  33.         XmlSchemaForm form = XmlSchemaForm.None;
  34.        
  35.         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.XmlAttributeAttribute"]/*' />
  36.         /// <devdoc>
  37.         /// <para>[To be supplied.]</para>
  38.         /// </devdoc>
  39.         public XmlAttributeAttribute()
  40.         {
  41.         }
  42.        
  43.         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.XmlAttributeAttribute1"]/*' />
  44.         /// <devdoc>
  45.         /// <para>[To be supplied.]</para>
  46.         /// </devdoc>
  47.         public XmlAttributeAttribute(string attributeName)
  48.         {
  49.             this.attributeName = attributeName;
  50.         }
  51.        
  52.         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.XmlAttributeAttribute2"]/*' />
  53.         /// <devdoc>
  54.         /// <para>[To be supplied.]</para>
  55.         /// </devdoc>
  56.         public XmlAttributeAttribute(Type type)
  57.         {
  58.             this.type = type;
  59.         }
  60.        
  61.         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.XmlAttributeAttribute3"]/*' />
  62.         /// <devdoc>
  63.         /// <para>[To be supplied.]</para>
  64.         /// </devdoc>
  65.         public XmlAttributeAttribute(string attributeName, Type type)
  66.         {
  67.             this.attributeName = attributeName;
  68.             this.type = type;
  69.         }
  70.        
  71.         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.Type"]/*' />
  72.         /// <devdoc>
  73.         /// <para>[To be supplied.]</para>
  74.         /// </devdoc>
  75.         public Type Type {
  76.             get { return type; }
  77.             set { type = value; }
  78.         }
  79.        
  80.         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.AttributeName"]/*' />
  81.         /// <devdoc>
  82.         /// <para>[To be supplied.]</para>
  83.         /// </devdoc>
  84.         public string AttributeName {
  85.             get { return attributeName == null ? string.Empty : attributeName; }
  86.             set { attributeName = value; }
  87.         }
  88.        
  89.         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.Namespace"]/*' />
  90.         /// <devdoc>
  91.         /// <para>[To be supplied.]</para>
  92.         /// </devdoc>
  93.         public string Namespace {
  94.             get { return ns; }
  95.             set { ns = value; }
  96.         }
  97.        
  98.         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.DataType"]/*' />
  99.         /// <devdoc>
  100.         /// <para>[To be supplied.]</para>
  101.         /// </devdoc>
  102.         public string DataType {
  103.             get { return dataType == null ? string.Empty : dataType; }
  104.             set { dataType = value; }
  105.         }
  106.        
  107.         /// <include file='doc\XmlAttributeAttribute.uex' path='docs/doc[@for="XmlAttributeAttribute.Form"]/*' />
  108.         /// <devdoc>
  109.         /// <para>[To be supplied.]</para>
  110.         /// </devdoc>
  111.         public XmlSchemaForm Form {
  112.             get { return form; }
  113.             set { form = value; }
  114.         }
  115.     }
  116. }

Developer Fusion