Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System / compmod / system / codedom / CodeLinePragma.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="CodeLinePragma.cs" company="Microsoft">
3 // 
4 // <OWNER>Microsoft</OWNER>
5 //     Copyright (c) Microsoft Corporation.  All rights reserved.
6 // </copyright>                                                                
7 //------------------------------------------------------------------------------
8
9 namespace System.CodeDom {
10
11     using System.Diagnostics;
12     using System;
13     using Microsoft.Win32;
14     using System.Collections;
15     using System.Runtime.InteropServices;
16
17     /// <devdoc>
18     ///    <para>
19     ///       Represents line number information for an external file.
20     ///    </para>
21     /// </devdoc>
22     [
23         ClassInterface(ClassInterfaceType.AutoDispatch),
24         ComVisible(true),
25         Serializable,
26     ]
27     public class CodeLinePragma {
28         private string fileName;
29         private int lineNumber;
30
31         public CodeLinePragma() {
32         }
33
34         /// <devdoc>
35         ///    <para>
36         ///       Initializes a new instance of <see cref='System.CodeDom.CodeLinePragma'/>.
37         ///    </para>
38         /// </devdoc>
39         public CodeLinePragma(string fileName, int lineNumber) {
40             FileName = fileName;
41             LineNumber = lineNumber;
42         }
43
44         /// <devdoc>
45         ///    <para>
46         ///       Gets or sets
47         ///       the filename of
48         ///       the associated file.
49         ///    </para>
50         /// </devdoc>
51         public string FileName {
52             get {
53                 return (fileName == null) ? string.Empty : fileName;
54             }
55             set {
56                 fileName = value;
57             }
58         }
59
60         /// <devdoc>
61         ///    <para>
62         ///       Gets or sets the line number of the file for
63         ///       the current pragma.
64         ///    </para>
65         /// </devdoc>
66         public int LineNumber {
67             get {
68                 return lineNumber;
69             }
70             set {
71                 lineNumber = value;
72             }
73         }
74     }
75 }