The Labs \ Source Viewer \ SSCLI \ System.CodeDom.Compiler \ CodeGeneratorOptions

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CodeGeneratorOptions.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.Compiler
  16. {
  17.     using System;
  18.     using System.CodeDom;
  19.     using System.Collections;
  20.     using System.Collections.Specialized;
  21.     using System.Security.Permissions;
  22.    
  23.    
  24.     /// <devdoc>
  25.     /// <para>
  26.     /// Represents options used in code generation
  27.     /// </para>
  28.     /// </devdoc>
  29.     [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
  30.     [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
  31.     public class CodeGeneratorOptions
  32.     {
  33.         private IDictionary options = new ListDictionary();
  34.        
  35.         /// <devdoc>
  36.         /// <para>[To be supplied.]</para>
  37.         /// </devdoc>
  38.         public CodeGeneratorOptions()
  39.         {
  40.         }
  41.        
  42.         /// <devdoc>
  43.         /// <para>[To be supplied.]</para>
  44.         /// </devdoc>
  45.         public object this[string index]
  46.         {
  47.             get { return options[index]; }
  48.             set { options[index] = value; }
  49.         }
  50.        
  51.         /// <devdoc>
  52.         /// <para>[To be supplied.]</para>
  53.         /// </devdoc>
  54.         public string IndentString {
  55.             get {
  56.                 object o = options["IndentString"];
  57.                 return ((o == null) ? " " : (string)o);
  58.             }
  59.             set { options["IndentString"] = value; }
  60.         }
  61.        
  62.         /// <devdoc>
  63.         /// <para>[To be supplied.]</para>
  64.         /// </devdoc>
  65.         public string BracingStyle {
  66.             get {
  67.                 object o = options["BracingStyle"];
  68.                 return ((o == null) ? "Block" : (string)o);
  69.             }
  70.             set { options["BracingStyle"] = value; }
  71.         }
  72.        
  73.         /// <devdoc>
  74.         /// <para>[To be supplied.]</para>
  75.         /// </devdoc>
  76.         public bool ElseOnClosing {
  77.             get {
  78.                 object o = options["ElseOnClosing"];
  79.                 return ((o == null) ? false : (bool)o);
  80.             }
  81.             set { options["ElseOnClosing"] = value; }
  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 { options["BlankLinesBetweenMembers"] = value; }
  93.         }
  94.        
  95.         [System.Runtime.InteropServices.ComVisible(false)]
  96.         public bool VerbatimOrder {
  97.             get {
  98.                 object o = options["VerbatimOrder"];
  99.                 return ((o == null) ? false : (bool)o);
  100.             }
  101.             set { options["VerbatimOrder"] = value; }
  102.         }
  103.     }
  104. }

Developer Fusion