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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CodeLinePragma.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 line number information for an external file.
  27.     /// </para>
  28.     /// </devdoc>
  29.     [ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable()]
  30.     public class CodeLinePragma
  31.     {
  32.         private string fileName;
  33.         private int lineNumber;
  34.        
  35.         public CodeLinePragma()
  36.         {
  37.         }
  38.        
  39.         /// <devdoc>
  40.         /// <para>
  41.         /// Initializes a new instance of <see cref='System.CodeDom.CodeLinePragma'/>.
  42.         /// </para>
  43.         /// </devdoc>
  44.         public CodeLinePragma(string fileName, int lineNumber)
  45.         {
  46.             FileName = fileName;
  47.             LineNumber = lineNumber;
  48.         }
  49.        
  50.         /// <devdoc>
  51.         /// <para>
  52.         /// Gets or sets
  53.         /// the filename of
  54.         /// the associated file.
  55.         /// </para>
  56.         /// </devdoc>
  57.         public string FileName {
  58.             get { return (fileName == null) ? string.Empty : fileName; }
  59.             set { fileName = value; }
  60.         }
  61.        
  62.         /// <devdoc>
  63.         /// <para>
  64.         /// Gets or sets the line number of the file for
  65.         /// the current pragma.
  66.         /// </para>
  67.         /// </devdoc>
  68.         public int LineNumber {
  69.             get { return lineNumber; }
  70.             set { lineNumber = value; }
  71.         }
  72.     }
  73. }

Developer Fusion