// 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 {
+
+#if NET_2_0
+ [Serializable]
+#endif
+ [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
+#if NET_1_1
+ private Evidence evidence;
+#endif
private int nativeCompilerReturnValue = 0;
private StringCollection output = new StringCollection ();
private string pathToAssembly;
//
public Assembly CompiledAssembly {
get {
+ if ((compiledAssembly == null) && (pathToAssembly != null))
+ compiledAssembly = Assembly.LoadFrom (pathToAssembly);
return compiledAssembly;
}
set {
}
}
- #if (NET_1_1)
+#if NET_1_1
public Evidence Evidence {
- get {
- return evidence;
- }
- set {
- evidence = value;
- }
+ get { return evidence; }
+ [SecurityPermission (SecurityAction.Demand, ControlEvidence = true)]
+ set { evidence = value; }
}
- #endif
+#endif
public int NativeCompilerReturnValue {
get {