PageRenderTime 354ms CodeModel.GetById 345ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/src/Otis/AssemblerGenerationOptions.cs

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