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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="XmlTypeAttribute.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.    
  21.     /// <include file='doc\XmlTypeAttribute.uex' path='docs/doc[@for="XmlTypeAttribute"]/*' />
  22.     /// <devdoc>
  23.     /// <para>[To be supplied.]</para>
  24.     /// </devdoc>
  25.     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct)]
  26.     public class XmlTypeAttribute : System.Attribute
  27.     {
  28.         bool includeInSchema = true;
  29.         bool anonymousType;
  30.         string ns;
  31.         string typeName;
  32.        
  33.         /// <include file='doc\XmlTypeAttribute.uex' path='docs/doc[@for="XmlTypeAttribute.XmlTypeAttribute"]/*' />
  34.         /// <devdoc>
  35.         /// <para>[To be supplied.]</para>
  36.         /// </devdoc>
  37.         public XmlTypeAttribute()
  38.         {
  39.         }
  40.        
  41.         /// <include file='doc\XmlTypeAttribute.uex' path='docs/doc[@for="XmlTypeAttribute.XmlTypeAttribute1"]/*' />
  42.         /// <devdoc>
  43.         /// <para>[To be supplied.]</para>
  44.         /// </devdoc>
  45.         public XmlTypeAttribute(string typeName)
  46.         {
  47.             this.typeName = typeName;
  48.         }
  49.        
  50.         /// <include file='doc\XmlTypeAttribute.uex' path='docs/doc[@for="XmlTypeAttribute.AnonymousType"]/*' />
  51.         /// <devdoc>
  52.         /// <para>[To be supplied.]</para>
  53.         /// </devdoc>
  54.         public bool AnonymousType {
  55.             get { return anonymousType; }
  56.             set { anonymousType = value; }
  57.         }
  58.        
  59.         /// <include file='doc\XmlTypeAttribute.uex' path='docs/doc[@for="XmlTypeAttribute.IncludeInSchema"]/*' />
  60.         /// <devdoc>
  61.         /// <para>[To be supplied.]</para>
  62.         /// </devdoc>
  63.         public bool IncludeInSchema {
  64.             get { return includeInSchema; }
  65.             set { includeInSchema = value; }
  66.         }
  67.        
  68.         /// <include file='doc\XmlTypeAttribute.uex' path='docs/doc[@for="XmlTypeAttribute.TypeName"]/*' />
  69.         /// <devdoc>
  70.         /// <para>[To be supplied.]</para>
  71.         /// </devdoc>
  72.         public string TypeName {
  73.             get { return typeName == null ? string.Empty : typeName; }
  74.             set { typeName = value; }
  75.         }
  76.        
  77.         /// <include file='doc\XmlTypeAttribute.uex' path='docs/doc[@for="XmlTypeAttribute.Namespace"]/*' />
  78.         /// <devdoc>
  79.         /// <para>[To be supplied.]</para>
  80.         /// </devdoc>
  81.         public string Namespace {
  82.             get { return ns; }
  83.             set { ns = value; }
  84.         }
  85.     }
  86. }

Developer Fusion