The Labs \ Source Viewer \ SSCLI \ System.CodeDom \ CodeComment

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CodeComment.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. //------------------------------------------------------------------------------
  15. namespace System.CodeDom
  16. {
  17.    
  18.     using System.Diagnostics;
  19.     using System;
  20.     using Microsoft.Win32;
  21.     using System.Collections;
  22.     using System.Runtime.InteropServices;
  23.    
  24.     /// <devdoc>
  25.     /// <para> Represents a comment.</para>
  26.     /// </devdoc>
  27.     [ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable()]
  28.     public class CodeComment : CodeObject
  29.     {
  30.         private string text;
  31.         private bool docComment = false;
  32.        
  33.         /// <devdoc>
  34.         /// <para>
  35.         /// Initializes a new instance of <see cref='System.CodeDom.CodeComment'/>.
  36.         /// </para>
  37.         /// </devdoc>
  38.         public CodeComment()
  39.         {
  40.         }
  41.        
  42.         /// <devdoc>
  43.         /// <para>
  44.         /// Initializes a new instance of <see cref='System.CodeDom.CodeComment'/> with the specified text as
  45.         /// contents.
  46.         /// </para>
  47.         /// </devdoc>
  48.         public CodeComment(string text)
  49.         {
  50.             Text = text;
  51.         }
  52.        
  53.         /// <devdoc>
  54.         /// <para>[To be supplied.]</para>
  55.         /// </devdoc>
  56.         public CodeComment(string text, bool docComment)
  57.         {
  58.             Text = text;
  59.             this.docComment = docComment;
  60.         }
  61.        
  62.         /// <devdoc>
  63.         /// <para>[To be supplied.]</para>
  64.         /// </devdoc>
  65.         public bool DocComment {
  66.             get { return docComment; }
  67.             set { docComment = value; }
  68.         }
  69.        
  70.         /// <devdoc>
  71.         /// <para>
  72.         /// Gets or setes
  73.         /// the text of the comment.
  74.         /// </para>
  75.         /// </devdoc>
  76.         public string Text {
  77.             get { return (text == null) ? string.Empty : text; }
  78.             set { text = value; }
  79.         }
  80.     }
  81. }

Developer Fusion