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