In corlib/System.Runtime.InteropServices:
[mono.git] / mcs / class / Microsoft.Build.Tasks / Microsoft.Build.Tasks / Vbc.cs
1 //
2 // UpdateManifest.cs
3 //
4 // Author:
5 //      Leszek Ciesielski  <skolima@gmail.com>
6 //      Marek Sieradzki  <marek.sieradzki@gmail.com>
7 //
8 // Copyright (C) 2006 Forcom (http://www.forcom.com.pl/)
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
17 // 
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
20 // 
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
29 #if NET_2_0
30
31 using System;
32 using System.IO;
33 using Microsoft.Build.Framework;
34 using Microsoft.Build.Utilities;
35
36 namespace Microsoft.Build.Tasks {
37
38         public class Vbc : ManagedCompiler {
39
40                 public Vbc ()
41                 {
42                 }
43
44                 [MonoTODO]
45                 protected internal override void AddResponseFileCommands (
46                                 CommandLineBuilderExtension commandLine )
47                 {
48                         base.AddResponseFileCommands (commandLine);
49
50                         commandLine.AppendSwitchIfNotNull ("/libpath:", AdditionalLibPaths, ",");
51
52                         commandLine.AppendSwitchIfNotNull ("/baseaddress:", BaseAddress);
53
54                         commandLine.AppendSwitchIfNotNull ("/define:", DefineConstants);
55
56                         // DisabledWarnings
57
58                         commandLine.AppendSwitchIfNotNull ("/doc", DocumentationFile);
59
60                         // ErrorReport
61                         
62                         // GenerateDocumentation
63                         
64                         if (Imports != null)
65                                 foreach (ITaskItem item in Imports)
66                                         commandLine.AppendSwitchIfNotNull ("/imports:", item.ItemSpec);
67                         
68                         commandLine.AppendSwitchIfNotNull ("/main:", MainEntryPoint);
69
70                         // NoStandardLib
71                         
72                         if (NoWarnings)
73                                 commandLine.AppendSwitch ("/nowarn");
74
75                         commandLine.AppendSwitchIfNotNull ("/optioncompare:", OptionCompare);
76
77                         if (Bag ["OptionExplicit"] != null)
78                                 if (OptionExplicit)
79                                         commandLine.AppendSwitch ("/optionexplicit+");
80                                 else
81                                         commandLine.AppendSwitch ("/optionexplicit-");
82
83                         if (Bag ["OptionStrict"] != null)
84                                 if (OptionStrict)
85                                         commandLine.AppendSwitch ("/optionstrict+");
86                                 else
87                                         commandLine.AppendSwitch ("/optionstrict-");
88
89                         // OptionStrictType
90                         
91                         // Platform
92                         
93                         if (References != null)
94                                 foreach (ITaskItem item in References)
95                                         commandLine.AppendSwitchIfNotNull ("/reference:", item.ItemSpec);
96         
97                         if (Bag ["RemoveIntegerChecks"] != null)
98                                 if (RemoveIntegerChecks)
99                                         commandLine.AppendSwitch ("/removeintchecks+");
100                                 else
101                                         commandLine.AppendSwitch ("/removeintchecks-");
102
103                         if (ResponseFiles != null)
104                                 foreach (ITaskItem item in ResponseFiles)
105                                         commandLine.AppendFileNameIfNotNull (String.Format ("@{0}", item.ItemSpec));
106
107                         commandLine.AppendSwitchIfNotNull ("/rootnamespace:", RootNamespace);
108
109                         commandLine.AppendSwitchIfNotNull ("/sdkpath:", SdkPath);
110
111                         // TargetCompactFramework
112                         
113                         // Verbosity
114
115                         // WarningsAsErrors
116
117                         // WarningsNotAsErrors
118
119                 }
120                 
121                 [MonoTODO]
122                 protected override bool CallHostObjectToExecute ()
123                 {
124                         throw new NotImplementedException ();
125                 }
126                 
127                 [MonoTODO]
128                 protected override string GenerateFullPathToTool ()
129                 {
130                         return Path.Combine (ToolPath, ToolName);
131                 }
132                 
133                 [MonoTODO]
134                 protected override HostObjectInitializationStatus InitializeHostObject ()
135                 {
136                         throw new NotImplementedException ();
137                 }
138
139                 [MonoTODO]
140                 protected override bool ValidateParameters ()
141                 {
142                         throw new NotImplementedException ();
143                 }
144                 
145                 [MonoTODO]
146                 public string BaseAddress {
147                         get { return (string) Bag ["BaseAddress"]; }
148                         set { Bag ["BaseAddress"] = value; }
149                 }
150                 
151                 [MonoTODO]
152                 public string DisabledWarnings  {
153                         get { return (string) Bag ["DisabledWarnings"]; }
154                         set { Bag ["DisabledWarnings"] = value; }
155                 }
156                 
157                 [MonoTODO]
158                 public string DocumentationFile {
159                         get { return (string) Bag ["DocumentationFile"]; }
160                         set { Bag ["DocumentationFile"] = value; }
161                 }
162                 
163                 [MonoTODO]
164                 public string ErrorReport {
165                         get { return (string) Bag ["ErrorReport"]; }
166                         set { Bag ["ErrorReport"] = value; }
167                 }
168                 
169                 [MonoTODO]
170                 public bool GenerateDocumentation {
171                         get { return GetBoolParameterWithDefault ("GenerateDocumentation", false); }
172                         set { Bag ["GenerateDocumentation"] = value; }
173                 }
174                 
175                 [MonoTODO]
176                 public ITaskItem [] Imports {
177                         get { return (ITaskItem []) Bag ["Imports"]; }
178                         set { Bag ["Imports"] = value; }
179                 }
180                 
181                 [MonoTODO]
182                 public bool NoStandardLib {
183                         get { return GetBoolParameterWithDefault ("NoStandardLib", false); }
184                         set { Bag ["NoStandardLib"] = value; }
185                 }
186                 
187                 [MonoTODO]
188                 public bool NoWarnings {
189                         get { return GetBoolParameterWithDefault ("NoWarnings", false); }
190                         set { Bag ["NoWarnings"] = value; }
191                 }
192                 
193                 [MonoTODO]
194                 public string OptionCompare {
195                         get { return (string) Bag ["OptionCompare"]; }
196                         set { Bag ["OptionCompare"] = value; }
197                 }
198                 
199                 [MonoTODO]
200                 public bool OptionExplicit {
201                         get { return GetBoolParameterWithDefault ("OptionExplicit", false); }
202                         set { Bag ["OpExplicit"] = value; }
203                 }
204                 
205                 [MonoTODO]
206                 public bool OptionStrict {
207                         get { return GetBoolParameterWithDefault ("OptionStrict", false); }
208                         set { Bag ["OptionStrict"] = value; }
209                 }
210                 
211                 [MonoTODO]
212                 public string OptionStrictType {
213                         get { return (string) Bag ["OptionStrictType"]; }
214                         set { Bag ["OptionStrictType"] = value; }
215                 }
216                 
217                 [MonoTODO]
218                 public string Platform {
219                         get { return (string) Bag ["Platfrom"]; }
220                         set { Bag ["Platform"] = value; }
221                 }
222                 
223                 [MonoTODO]
224                 public bool RemoveIntegerChecks {
225                         get { return GetBoolParameterWithDefault ("RemoveIntegerChecks", false); }
226                         set { Bag ["RemoveIntegerChecks"] = value; }
227                 }
228
229                 [MonoTODO]
230                 public string RootNamespace {
231                         get { return (string) Bag ["RootNamespace"]; }
232                         set { Bag ["RootNamespace"] = value; }
233                 }
234
235                 [MonoTODO]
236                 public string SdkPath {
237                         get { return (string) Bag ["SdkPath"]; }
238                         set { Bag ["SdkPath"] = value; }
239                 }
240
241                 [MonoTODO]
242                 public bool TargetCompactFramework {
243                         get { return (bool) Bag ["TargetCompactFramework"]; }
244                         set { Bag ["TargetCompactFramework"] = value; }
245                 }
246
247                 [MonoTODO]
248                 protected override string ToolName {
249                         get { return "vbnc"; }
250                 }
251
252                 [MonoTODO]
253                 public bool UseHostCompilerIfAvailable {
254                         get { return (bool) Bag ["UseHostCompilerIfAvailable"]; }
255                         set { Bag ["UseHostCompilerIfAvailable"] = value; }
256                 }
257
258                 [MonoTODO]
259                 public string Verbosity {
260                         get { return (string) Bag ["Verbosity"]; }
261                         set { Bag ["Verbosity"] = value; }
262                 }
263
264                 [MonoTODO]
265                 public string WarningsAsErrors {
266                         get { return (string) Bag ["WarningsAsErrors"]; }
267                         set { Bag ["WarningsAsErrors"] = value; }
268                 }
269                 
270                 [MonoTODO]
271                 public string WarningsNotAsErrors {
272                         get { return (string) Bag ["WarningsNotAsErrors"]; }
273                         set { Bag ["WarningsNotAsErrors"] = value; }
274                 }
275         }
276 }
277
278 #endif