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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CodeSnippetCompileUnit.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>
  26.     /// Represents a snippet block of code.
  27.     /// </para>
  28.     /// </devdoc>
  29.     [ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable()]
  30.     public class CodeSnippetCompileUnit : CodeCompileUnit
  31.     {
  32.         private string value;
  33.         private CodeLinePragma linePragma;
  34.        
  35.         public CodeSnippetCompileUnit()
  36.         {
  37.         }
  38.        
  39.         public CodeSnippetCompileUnit(string value)
  40.         {
  41.             Value = value;
  42.         }
  43.        
  44.         /// <devdoc>
  45.         /// <para>
  46.         /// Gets or sets
  47.         /// the snippet
  48.         /// text of the code block to represent.
  49.         /// </para>
  50.         /// </devdoc>
  51.         public string Value {
  52.             get { return (value == null) ? string.Empty : value; }
  53.             set { this.value = value; }
  54.         }
  55.        
  56.         /// <devdoc>
  57.         /// <para>
  58.         /// The line the code block starts on.
  59.         /// </para>
  60.         /// </devdoc>
  61.         public CodeLinePragma LinePragma {
  62.             get { return linePragma; }
  63.             set { linePragma = value; }
  64.         }
  65.     }
  66. }

Developer Fusion