Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System / compmod / system / codedom / compiler / CodeGeneratorOptions.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="CodeGeneratorOptions.cs" company="Microsoft">
3 // 
4 // <OWNER>Microsoft</OWNER>
5 //     Copyright (c) Microsoft Corporation.  All rights reserved.
6 // </copyright>                                                                
7 //------------------------------------------------------------------------------
8
9 namespace System.CodeDom.Compiler {
10     using System;
11     using System.CodeDom;
12     using System.Collections;
13     using System.Collections.Specialized;
14     using System.Security.Permissions;
15
16
17     /// <devdoc>
18     ///    <para>
19     ///       Represents options used in code generation
20     ///    </para>
21     /// </devdoc>
22     [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")]
23     [PermissionSet(SecurityAction.InheritanceDemand, Name="FullTrust")]
24     public class CodeGeneratorOptions {
25         private IDictionary options = new ListDictionary();
26
27         /// <devdoc>
28         ///    <para>[To be supplied.]</para>
29         /// </devdoc>
30         public CodeGeneratorOptions() {
31         }
32
33         /// <devdoc>
34         ///    <para>[To be supplied.]</para>
35         /// </devdoc>
36         public object this[string index] {
37             get {
38                 return options[index];
39             }
40             set {
41                 options[index] = value;
42             }
43         }
44
45         /// <devdoc>
46         ///    <para>[To be supplied.]</para>
47         /// </devdoc>
48         public string IndentString {
49             get {
50                 object o = options["IndentString"];
51                 return ((o == null) ? "    " : (string)o);
52             }
53             set {
54                 options["IndentString"] = value;
55             }
56         }
57
58         /// <devdoc>
59         ///    <para>[To be supplied.]</para>
60         /// </devdoc>
61         public string BracingStyle {
62             get {
63                 object o = options["BracingStyle"];
64                 return ((o == null) ? "Block" : (string)o);
65             }
66             set {
67                 options["BracingStyle"] = value;
68             }
69         }
70
71         /// <devdoc>
72         ///    <para>[To be supplied.]</para>
73         /// </devdoc>
74         public bool ElseOnClosing {
75             get {
76                 object o = options["ElseOnClosing"];
77                 return ((o == null) ? false : (bool)o);
78             }
79             set {
80                 options["ElseOnClosing"] = value;
81             }
82         }
83
84         /// <devdoc>
85         ///    <para>[To be supplied.]</para>
86         /// </devdoc>
87         public bool BlankLinesBetweenMembers {
88             get {
89                 object o = options["BlankLinesBetweenMembers"];
90                 return ((o == null) ? true : (bool)o);
91             }
92             set {
93                 options["BlankLinesBetweenMembers"] = value;
94             }
95         }
96
97         [System.Runtime.InteropServices.ComVisible(false)]
98         public bool VerbatimOrder {
99             get {
100                 object o = options["VerbatimOrder"];
101                 return ((o == null) ? false : (bool)o);
102             }
103             set {
104                 options["VerbatimOrder"] = value;
105             }
106         }
107     }
108 }