[Http]: Clear the 'SendChunked' flag when redirecting.
[mono.git] / mcs / class / System / System.CodeDom.Compiler / CompilerResults.cs
index 35072729eed24315c6ed0dd034f36f98ea20609b..8ba271fc0fae4cd33bbefe388cd40649ed5a64da 100644 (file)
@@ -6,8 +6,7 @@
 //   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
 //
 // (C) 2002 Ximian, Inc.
-//
-
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Collections.Specialized;
+using System.Reflection;
+using System.Security.Permissions;
 using System.Security.Policy;
 
-namespace System.CodeDom.Compiler
-{
-       using System.Reflection;
-       using System.Collections.Specialized;
+namespace System.CodeDom.Compiler {
+
+       [Serializable]
+       [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
+       [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
+       public class CompilerResults {
 
-       public class CompilerResults
-       {
                private Assembly compiledAssembly;
                private CompilerErrorCollection errors = new CompilerErrorCollection ();
-               #if (NET_1_1)
-                       private Evidence evidence;
-               #endif
+               private Evidence evidence;
                private int nativeCompilerReturnValue = 0;
                private StringCollection output = new StringCollection ();
                private string pathToAssembly;
@@ -61,6 +61,8 @@ namespace System.CodeDom.Compiler
                //
                public Assembly CompiledAssembly {
                        get {
+                               if ((compiledAssembly == null) && (pathToAssembly != null))
+                                       compiledAssembly = Assembly.LoadFrom (pathToAssembly);
                                return compiledAssembly;
                        }
                        set {
@@ -76,16 +78,14 @@ namespace System.CodeDom.Compiler
                        }
                }
 
-               #if (NET_1_1)
+#if NET_4_0
+               [Obsolete]
+#endif
                public Evidence Evidence {
-                       get {
-                               return evidence;
-                       }
-                       set {
-                               evidence = value;
-                       }
+                       get { return evidence; }
+                       [SecurityPermission (SecurityAction.Demand, ControlEvidence = true)]
+                       set { evidence = value; }
                }
-               #endif
 
                public int NativeCompilerReturnValue {
                        get {
@@ -102,6 +102,9 @@ namespace System.CodeDom.Compiler
                                        output = new StringCollection();
                                return output;
                        }
+                       internal set {
+                               output = value;
+                       }
                }
 
                public string PathToAssembly {