/src/Otis/AssemblerGenerationOptions.cs

http://otis-lib.googlecode.com/ · C# · 80 lines · 36 code · 5 blank · 39 comment · 0 complexity · 33f06229d5b7a459b20088dc245d63e9 MD5 · raw file

  1. namespace Otis
  2. {
  3. /// <summary>
  4. /// Represents options for generation of the assembler. Assembler can be generated as
  5. /// a dll assembly or only a source code.
  6. /// </summary>
  7. public class AssemblerGenerationOptions
  8. {
  9. private OutputType m_outputType = OutputType.InMemoryAssembly;
  10. private string m_namespace = string.Empty;
  11. private string m_outputFile = string.Empty;
  12. private bool m_includeDebugInformation = false;
  13. private bool m_supressInstanceCreation = false;
  14. /// <summary>
  15. /// Gets/sets the type of the output for the generator.
  16. /// </summary>
  17. /// <remarks>
  18. /// Default is <c>OutputType.InMemoryAssembly</c>
  19. /// which results in an assembly being create in the memory of the client process, but without any
  20. /// artifacts on file system.
  21. /// <para>
  22. /// <c>OutputType.Assembly</c> specifies that an assembly should be created on the file system.
  23. /// The assembly contains the assembler implementation and can be used independently. <see cref="OutputFile"/>
  24. /// property must be set. (e.g. to "myAssembler.dll")
  25. /// </para>
  26. /// <para>
  27. /// <c>OutputType.SourceCode</c> specifies that only the source code for the assembler will be created on the file system.
  28. /// This file contains the assembler implementation and can be included in some other project.
  29. /// <see cref="OutputFile"/> property must be set. (e.g. to "assembler.cs")
  30. /// </para>
  31. /// </remarks>
  32. public OutputType OutputType
  33. {
  34. get { return m_outputType; }
  35. set { m_outputType = value; }
  36. }
  37. /// <summary>
  38. /// gets sets the namespace for generated assembler class. If omit0ted, a unique
  39. /// namespace name will be automatically generated
  40. /// </summary>
  41. public string Namespace
  42. {
  43. get { return m_namespace; }
  44. set { m_namespace = value; }
  45. }
  46. /// <summary>
  47. /// name of the output file if <see cref="OutputType"/> is <c>OutputType.Assembly</c>
  48. /// or <c>OutputType.SourceCode</c>
  49. /// </summary>
  50. public string OutputFile
  51. {
  52. get { return m_outputFile; }
  53. set { m_outputFile = value; }
  54. }
  55. /// <summary>
  56. /// Gets/sets whether the debug information will be added to the generated assembly. This option
  57. /// is ignored if <see cref="OutputType"/> is <c>OutputType.SourceCode</c>
  58. /// </summary>
  59. public bool IncludeDebugInformationInAssembly
  60. {
  61. get { return m_includeDebugInformation; }
  62. set { m_includeDebugInformation = value; }
  63. }
  64. /// <summary>
  65. /// Gets/sets whether an assembler instance will be created when the assembly is built.
  66. /// Default is <c>true</c>. This should be set to false if the assembler is not intended
  67. /// to be used, but only the assembly generation is wanted
  68. /// </summary>
  69. public bool SupressInstanceCreation
  70. {
  71. get { return m_supressInstanceCreation; }
  72. set { m_supressInstanceCreation = value; }
  73. }
  74. }
  75. }