2006-02-26 Marek Sieradzki <marek.sieradzki@gmail.com>
authorMarek Sieradzki <msierad@mono-cvs.ximian.com>
Sun, 26 Feb 2006 14:02:30 +0000 (14:02 -0000)
committerMarek Sieradzki <msierad@mono-cvs.ximian.com>
Sun, 26 Feb 2006 14:02:30 +0000 (14:02 -0000)
* AL.cs: Added Output attribute to OutputAssembly.
* AppDomainIsolatedTaskExtension.cs: Added LoadInSeparateAppDomain
attribute.
* Copy.cs: Added Output attribute to DestinationFiles and Required to
SourceFiles.
* CreateItem.cs, CreateProperty.cs: Changed string to string[].
* Csc.cs: Added PdbFile property.
* Error.cs: Added Code and HelpKeyword properties.
* Exec.cs: Changed TaskExtension to ToolTaskExtension.
* GenerateResource.cs: Added NeverLockType and PublicClass properties.
* GenerateTrustInfo.cs: Added Required to TargetZone and Output to
TrustInfoFile.
* GetFrameworkPath.cs, GetFrameworkSdkPath: Added Output to Path.
* MSBuild.cs: Changed string to string[].
* ReadLinesFromFile.cs: Added Required to File.
* RegiserAssembly.cs: Added AssemblyListFile and CreateCodeBase
properties.
* UnregisterAssembly.cs: Added AssemblyListFile property.
* WriteLinesToFile.cs: Added Required to Lines.

svn path=/trunk/mcs/; revision=57304

19 files changed:
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.dll.sources
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AppDomainIsolatedTaskExtension.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Copy.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateItem.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateProperty.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Error.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateTrustInfo.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkSdkPath.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/MSBuild.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ReadLinesFromFile.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/RegisterAssembly.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/UnregisterAssembly.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/WriteLinesToFile.cs

index 65108c6a3c09e0c8c92a42d31b6eccc35bdeb36a..ecb1d4b28bd6146e708eeec755abe308c1051923 100644 (file)
@@ -3,6 +3,7 @@
 Assembly/AssemblyInfo.cs
 Microsoft.Build.Tasks/AL.cs
 Microsoft.Build.Tasks/AppDomainIsolatedTaskExtension.cs
+Microsoft.Build.Tasks/CombinePath.cs
 Microsoft.Build.Tasks/CommandLineBuilderExtension.cs
 Microsoft.Build.Tasks/Copy.cs
 Microsoft.Build.Tasks/CreateItem.cs
index bfda2c7c9029b0d640f1a4709e26022c55ace1aa..dad99232833f204db30d95f37fd3e506725a385f 100644 (file)
@@ -192,6 +192,7 @@ namespace Microsoft.Build.Tasks {
                }
 
                [Required]
+               [Output]
                public ITaskItem OutputAssembly {
                        get { return (ITaskItem) Bag ["OutputAssembly"]; }
                        set { Bag ["OutputAssembly"] = value; }
index 75fdff1ba6c39bb53edddaf77addfa1a42610afc..14c82fcaba72e8cb82ceff72216e322d0643cd07 100644 (file)
 
 #if NET_2_0
 
+using Microsoft.Build.Framework;
 using Microsoft.Build.Utilities;
 
 namespace Microsoft.Build.Tasks {
+       [LoadInSeparateAppDomain]
        public abstract class AppDomainIsolatedTaskExtension : AppDomainIsolatedTask {
                public new TaskLoggingHelper Log {
                        get {
index 6374abd252b49f1b1d3c9b661bb9a57feefd42ef..05437e9fb721a4ca05e10a545a2590ec1833debc 100644 (file)
@@ -1,3 +1,25 @@
+2006-02-26  Marek Sieradzki  <marek.sieradzki@gmail.com>
+
+       * AL.cs: Added Output attribute to OutputAssembly.
+       * AppDomainIsolatedTaskExtension.cs: Added LoadInSeparateAppDomain
+       attribute.
+       * Copy.cs: Added Output attribute to DestinationFiles and Required to
+       SourceFiles.
+       * CreateItem.cs, CreateProperty.cs: Changed string to string[].
+       * Csc.cs: Added PdbFile property.
+       * Error.cs: Added Code and HelpKeyword properties.
+       * Exec.cs: Changed TaskExtension to ToolTaskExtension.
+       * GenerateResource.cs: Added NeverLockType and PublicClass properties.
+       * GenerateTrustInfo.cs: Added Required to TargetZone and Output to
+       TrustInfoFile.
+       * GetFrameworkPath.cs, GetFrameworkSdkPath: Added Output to Path.
+       * MSBuild.cs: Changed string to string[].
+       * ReadLinesFromFile.cs: Added Required to File.
+       * RegiserAssembly.cs: Added AssemblyListFile and CreateCodeBase
+       properties.
+       * UnregisterAssembly.cs: Added AssemblyListFile property.
+       * WriteLinesToFile.cs: Added Required to Lines.
+
 2006-02-25  Marek Sieradzki <marek.sieradzki@gmail.com> 
 
        * Csc.cs, ManagedCompiler.cs: Changes required by the new API.
index 95ff042fac599303867947cf0c2f45565541024b..45ccfddb570329fb5d2a95e096a7b8b65a80c016 100644 (file)
@@ -128,6 +128,7 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
+               [Output]
                public ITaskItem[] DestinationFiles {
                        get {
                                return destinationFiles;
@@ -155,6 +156,7 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
+               [Required]
                public ITaskItem[] SourceFiles {
                        get {
                                return sourceFiles;
index f99fd73a680070c3a4d7263952bcbd54dca93e71..81d5dcbded780e83de67686312d81ce60d67a90d 100644 (file)
@@ -32,7 +32,7 @@ using Microsoft.Build.Framework;
 namespace Microsoft.Build.Tasks {
        public class CreateItem : TaskExtension {
        
-               string          additionalMetadata;
+               string[]                additionalMetadata;
                ITaskItem[]     exclude;
                ITaskItem[]     include;
        
@@ -45,7 +45,7 @@ namespace Microsoft.Build.Tasks {
                        return true;
                }
 
-               public string AdditionalMetadata {
+               public string[] AdditionalMetadata {
                        get { return additionalMetadata; }
                        set { additionalMetadata = value; }
                }
@@ -55,6 +55,7 @@ namespace Microsoft.Build.Tasks {
                        set { exclude = value; }
                }
 
+               [Output]
                public ITaskItem[] Include {
                        get { return include; }
                        set { include = value; }
index e619634b4d762de3e8df4b63f0563fe3677a5077..537742e550a0ff0b6802100090da4eeb775f1b79 100644 (file)
@@ -32,8 +32,8 @@ using Microsoft.Build.Framework;
 namespace Microsoft.Build.Tasks {
        public class CreateProperty : TaskExtension {
        
-               string value;
-               string valueSetByTask;
+               string[] value;
+               string[] valueSetByTask;
        
                public CreateProperty ()
                {
@@ -44,13 +44,13 @@ namespace Microsoft.Build.Tasks {
                        return true;
                }
 
-               public string Value {
+               public string[] Value {
                        get { return this.@value; }
                        set { this.@value = value; }
                }
 
                // FIXME: is this value after evaluation?
-               public string ValueSetByTask {
+               public string[] ValueSetByTask {
                        get { return valueSetByTask; }
                }
        }
index 08527462e707aee543f4a027fee82a721624edc4..dbf383f446d4a8c3a30243157a91a7a856062f82 100644 (file)
@@ -86,9 +86,9 @@ namespace Microsoft.Build.Tasks {
                        set { Bag ["BaseAddress"] = value; }
                }
 
-               public bool CheckForOverflowUnderFlow {
-                       get { return GetBoolParameterWithDefault ("CheckForOverflowUnderFlow", false); }
-                       set { Bag ["CheckForOverflowUnderFlow"] = value; }
+               public bool CheckForOverflowUnderflow {
+                       get { return GetBoolParameterWithDefault ("CheckForOverflowUnderflow", false); }
+                       set { Bag ["CheckForOverflowUnderflow"] = value; }
                }
 
                public string DisabledWarnings {
@@ -125,6 +125,11 @@ namespace Microsoft.Build.Tasks {
                        get { return GetBoolParameterWithDefault ("NoStandardLib", false); }
                        set { Bag ["NoStandardLib"] = value; }
                }
+               
+               public string PdbFile {
+                       get { return (string) Bag ["PdbFile"]; }
+                       set { Bag ["PdbFile"] = value; }
+               }
 
                public string Platform {
                        get { return (string) Bag ["Platform"]; }
index 10ac658805289c1020e27a50d9c4c9ad31d258a1..cedf511ad4acfc262b2c8c35f523350c332a5571 100644 (file)
 
 namespace Microsoft.Build.Tasks {
        public sealed class Error : TaskExtension {
-               private string text;
+       
+               string  code;
+               string  helpKeyword;
+               string  text;
                
                public Error ()
                {
@@ -44,13 +47,19 @@ namespace Microsoft.Build.Tasks {
                        return true;
                }
 
+               public string Code {
+                       get { return code; }
+                       set { code = value; }
+               }
+               
+               public string HelpKeyword {
+                       get { return helpKeyword; }
+                       set { helpKeyword = value; }
+               }
+               
                public string Text {
-                       get {
-                               return text;
-                       }
-                       set {
-                               text = value;
-                       }
+                       get { return text; }
+                       set { text = value; }
                }
        }
 }
index 9488cca1f072960429d7916da903a9c0d256948a..886bb9bec474fbd6e467531ce3dab0ec58e75967 100644 (file)
@@ -38,13 +38,13 @@ using Microsoft.Build.Framework;
 using Microsoft.Build.Utilities;
 
 namespace Microsoft.Build.Tasks {
-       public class Exec : TaskExtension {
+       public class Exec : ToolTaskExtension {
        
                string          command;
-               int             exitCode;
                bool            ignoreExitCode;
                ITaskItem[]     outputs;
-               int             timeout;
+               string          stdErrEncoding;
+               string          stdOutEncoding;
                string          workingDirectory;
                
                Process         process;
@@ -53,7 +53,7 @@ namespace Microsoft.Build.Tasks {
                public Exec ()
                {
                        process = new Process ();
-                       timeout = Int32.MaxValue;
+                       //timeout = Int32.MaxValue;
                        ignoreExitCode = false;
                        executionTime = 0;
                }
@@ -80,7 +80,7 @@ namespace Microsoft.Build.Tasks {
                                process.Start ();
                                process.WaitForExit ();
 
-                               exitCode = process.ExitCode;
+                               //exitCode = process.ExitCode;
                                while ((line = process.StandardOutput.ReadLine ()) != null)
                                        temporaryOutputs.Add (line);
                                outputs = new ITaskItem [temporaryOutputs.Count];
@@ -93,23 +93,24 @@ namespace Microsoft.Build.Tasks {
                                return false;
                        }
                        
-                       if (exitCode != 0 && ignoreExitCode == false)
+                       /*if (exitCode != 0 && ignoreExitCode == false)
                                return false;
-                       else
+                       else*/
                                return true;
                }
                
+               [MonoTODO]
+               protected override string GenerateFullPathToTool ()
+               {
+                       return null;
+               }
+               
                [Required]
                public string Command {
                        get { return command; }
                        set { command = value; }
                }
 
-               [Output]
-               public int ExitCode {
-                       get { return exitCode; }
-               }
-
                public bool IgnoreExitCode {
                        get { return ignoreExitCode; }
                        set { ignoreExitCode = value; }
@@ -121,19 +122,37 @@ namespace Microsoft.Build.Tasks {
                        set { outputs = value; }
                }
 
-               public Encoding StandardErrorEncoding {
+               protected override Encoding StandardErrorEncoding {
                        get { return Console.Error.Encoding; }
-                       set { Console.SetError (new StreamWriter(Console.OpenStandardError (), value)); }
+               }
+               
+               protected override MessageImportance StandardErrorLoggingImportance {
+                       get { return base.StandardErrorLoggingImportance; }
                }
 
-               public Encoding StandardOutputEncoding {
+               protected override Encoding StandardOutputEncoding {
                        get { return Console.Out.Encoding; }
-                       set { Console.SetOut (new StreamWriter (Console.OpenStandardOutput (), value)); }
                }
-
-               public int Timeout {
-                       get { return timeout; }
-                       set { timeout = value; }
+               
+               protected override MessageImportance StandardOutputLoggingImportance {
+                       get { return base.StandardOutputLoggingImportance; }
+               }
+               
+               //FIXME: what's this?
+               public string StdOutEncoding {
+                       get { return stdOutEncoding; }
+                       set { stdOutEncoding = value; }
+               }
+               
+               //FIXME: what's this?
+               public string StdErrEncoding {
+                       get { return stdErrEncoding; }
+                       set { stdErrEncoding = value; }
+               }
+               
+               // FIXME: crashes the compiler when replaced with return base.ToolName
+               protected override string ToolName {
+                       get { return String.Empty; }
                }
 
                public string WorkingDirectory {
@@ -143,4 +162,4 @@ namespace Microsoft.Build.Tasks {
        }
 }
 
-#endif
\ No newline at end of file
+#endif
index 5987cac9830e6a072f4024d9488de8a1c10a7e67..8167c3e5030a1941628947b3024a2587daa7a9fe 100644 (file)
@@ -41,8 +41,9 @@ namespace Microsoft.Build.Tasks {
        public sealed class GenerateResource : TaskExtension {
        
                ITaskItem[]     filesWritten;
-               //bool          neverLockTypeAssemblies;
+               bool            neverLockTypeAssemblies;
                ITaskItem[]     outputResources;
+               bool            publicClass;
                ITaskItem[]     references;
                ITaskItem[]     sources;
                ITaskItem       stateFile;
@@ -177,14 +178,15 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
-               /*public bool NeverLockTypeAssemblies {
+               [MonoTODO]
+               public bool NeverLockTypeAssemblies {
                        get {
                                return neverLockTypeAssemblies;
                        }
                        set {
                                neverLockTypeAssemblies = value;
                        }
-               }*/
+               }
 
                [Output]
                public ITaskItem[] OutputResources {
@@ -195,6 +197,11 @@ namespace Microsoft.Build.Tasks {
                                outputResources = value;
                        }
                }
+               
+               public bool PublicClass {
+                       get { return publicClass; }
+                       set { publicClass = value; }
+               }
 
                public ITaskItem[] References {
                        get {
@@ -224,6 +231,7 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
+               [Output]
                public string StronglyTypedClassName {
                        get {
                                return stronglyTypedClassName;
@@ -233,7 +241,7 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
-               public string StronglyTypedFilename {
+               public string StronglyTypedFileName {
                        get {
                                return stronglyTypedFilename;
                        }
index 7218744d07165441ed5359bfe90d6fb738dfc9ad..8990397e8b8b8ce3b87c23bf963f0b9624154b2b 100644 (file)
@@ -64,7 +64,6 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
-               [Required]
                public string TargetZone {
                        get {
                                return targetZone;
@@ -75,6 +74,7 @@ namespace Microsoft.Build.Tasks {
                }
 
                [Required]
+               [Output]
                public ITaskItem TrustInfoFile {
                        get {
                                return trustInfoFile;
index d8d1f18f1a460584895b58646ab513c0785b2380..f35ac557e4c79ef5578fade25bf2064881035dd1 100644 (file)
@@ -27,7 +27,7 @@
 
 #if NET_2_0
 
-using Microsoft.Build.Tasks;
+using Microsoft.Build.Framework;
 
 namespace Microsoft.Build.Tasks {
        public class GetFrameworkPath : TaskExtension {
@@ -44,6 +44,7 @@ namespace Microsoft.Build.Tasks {
                        return true;
                }
 
+               [Output]
                public string Path {
                        get {
                                return path;
index 03f0548eb385861b1ccd8d5a7109244136f11178..bf6a11299795392cf30e673435bff0aa3f0b4989 100644 (file)
@@ -27,7 +27,7 @@
 
 #if NET_2_0
 
-using Microsoft.Build.Tasks;
+using Microsoft.Build.Framework;
 
 namespace Microsoft.Build.Tasks {
        public class GetFrameworkSdkPath : TaskExtension {
@@ -44,6 +44,7 @@ namespace Microsoft.Build.Tasks {
                        return true;
                }
 
+               [Output]
                public string Path {
                        get {
                                return path;
index 8d7fcf2232d037d544a89f6ed987790dc6630287..6d02ec974063fbb6e01884894ba32c688af2a213 100644 (file)
@@ -36,7 +36,7 @@ namespace Microsoft.Build.Tasks {
        public class MSBuild : TaskExtension {
        
                ITaskItem[]     projects;
-               string          properties;
+               string[]                properties;
                bool            rebaseOutputs;
                bool            runEachTargetSeparately;
                bool            stopOnFirstFailure;
@@ -72,7 +72,7 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
-               public string Properties {
+               public string[] Properties {
                        get {
                                return properties;
                        }
@@ -108,6 +108,7 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
+               [Output]
                public ITaskItem[] TargetOutputs {
                        get {
                                return targetOutputs;
index cf216c737050aaf73db508cc91d32aa0aeca21e8..f809137d6b77b379427c19d4d23e694b6194d0a6 100644 (file)
@@ -73,6 +73,7 @@ namespace Microsoft.Build.Tasks {
                        
                }
 
+               [Required]
                public ITaskItem File {
                        get {
                                return file;
index 238af3dc2cf24e99e0e875b4ac380e4dc3c8a59e..7b8ab22f67b9fec4b7d2bf0741ce02cfcd8a5fd2 100644 (file)
@@ -36,8 +36,8 @@ namespace Microsoft.Build.Tasks {
        public class RegisterAssembly : AppDomainIsolatedTaskExtension, ITypeLibExporterNotifySink {
        
                ITaskItem[]     assemblies;
+               ITaskItem       assemblyListFile;
                bool            createCodeBase;
-               ITaskItem       stateFile;
                ITaskItem[]     typeLibFiles;
        
                public RegisterAssembly ()
@@ -70,24 +70,25 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
-               public bool CreateCodeBase  {
+               public ITaskItem AssemblyListFile {
                        get {
-                               return createCodeBase;
+                               return assemblyListFile;
                        }
                        set {
-                               createCodeBase = value;
+                               assemblyListFile = value;
                        }
                }
 
-               public ITaskItem StateFile {
+               public bool CreateCodeBase  {
                        get {
-                               return stateFile;
+                               return createCodeBase;
                        }
                        set {
-                               stateFile = value;
+                               createCodeBase = value;
                        }
                }
 
+               [Output]
                public ITaskItem[] TypeLibFiles {
                        get {
                                return typeLibFiles;
index f2c72fe9deefd7dc02aa2695c2628b3c2076bc34..6c3917403e88e557c94638fc8dc26ee2903e86b8 100644 (file)
@@ -31,9 +31,10 @@ using Microsoft.Build.Framework;
 
 namespace Microsoft.Build.Tasks {
        public class UnregisterAssembly : AppDomainIsolatedTaskExtension {
-               private ITaskItem[] assemblies;
-               private ITaskItem stateFile;
-               private ITaskItem[] typeLibFiles;
+       
+               ITaskItem[]     assemblies;
+               ITaskItem       assemblyListFile;
+               ITaskItem[]     typeLibFiles;
        
                public UnregisterAssembly ()
                {
@@ -54,12 +55,12 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
-               public ITaskItem StateFile {
+               public ITaskItem AssemblyListFile {
                        get {
-                               return stateFile;
+                               return assemblyListFile;
                        }
                        set {
-                               stateFile = value;
+                               assemblyListFile = value;
                        }
                }
 
index 87026c043dbd4d7bca75033bade7f64dd84a45bf..474436da4b1292d15f4ad8a6416546a411facc02 100644 (file)
@@ -79,7 +79,6 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
-               [Required]
                public ITaskItem[] Lines {
                        get {
                                return lines;