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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CodeStatement.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.     using System.Runtime.Serialization;
  24.    
  25.     /// <devdoc>
  26.     /// <para>
  27.     /// Represents a statement.
  28.     /// </para>
  29.     /// </devdoc>
  30.     [ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable()]
  31.     public class CodeStatement : CodeObject
  32.     {
  33.         private CodeLinePragma linePragma;
  34.        
  35.         // Optionally Serializable
  36.         [OptionalField()]
  37.         private CodeDirectiveCollection startDirectives = null;
  38.         [OptionalField()]
  39.         private CodeDirectiveCollection endDirectives = null;
  40.        
  41.        
  42.         /// <devdoc>
  43.         /// <para>
  44.         /// The line the statement occurs on.
  45.         /// </para>
  46.         /// </devdoc>
  47.         public CodeLinePragma LinePragma {
  48.             get { return linePragma; }
  49.             set { linePragma = value; }
  50.         }
  51.        
  52.         public CodeDirectiveCollection StartDirectives {
  53.             get {
  54.                 if (startDirectives == null) {
  55.                     startDirectives = new CodeDirectiveCollection();
  56.                 }
  57.                 return startDirectives;
  58.             }
  59.         }
  60.        
  61.         public CodeDirectiveCollection EndDirectives {
  62.             get {
  63.                 if (endDirectives == null) {
  64.                     endDirectives = new CodeDirectiveCollection();
  65.                 }
  66.                 return endDirectives;
  67.             }
  68.         }
  69.     }
  70. }

Developer Fusion