Browse Source

2003-11-11 Miguel de Icaza <[email protected]>

	* AppDomain.cs, Activator.cs: New unimplmented entry points from
	1.1 (Com activation related).

	* Exception.cs: Formatting.

	* IServiceProvider.cs: Add ComVisible (true).

	* AppDomainSetup.cs: Add a couple more properties from .NET 1.1

svn path=/trunk/mcs/; revision=19846
Miguel de Icaza 22 years ago
parent
commit
bb428553c3

+ 10 - 0
mcs/class/corlib/System/Activator.cs

@@ -15,6 +15,7 @@ using System.Runtime.Remoting;
 using System.Runtime.Remoting.Activation;
 using System.Runtime.CompilerServices;
 using System.Security.Policy;
+using System.Configuration.Assemblies;
 
 namespace System 
 {
@@ -32,6 +33,15 @@ namespace System
 			throw new NotImplementedException(); 
 		}
 
+#if NET_1_1
+		[MonoTODO]
+		public static ObjectHandle CreateComInstanceFrom (string assemblyFile, string typeName,
+								  byte []hash, AssemblyHashAlgorithm hashalgo)
+		{
+			throw new NotImplementedException(); 
+		}
+#endif
+		
 		public static ObjectHandle CreateInstanceFrom (string assemblyFile, string typeName)
 		{
 			return CreateInstanceFrom (assemblyFile, typeName, null);

+ 10 - 1
mcs/class/corlib/System/AppDomain.cs

@@ -27,6 +27,7 @@ using System.Runtime.Remoting.Messaging;
 using System.Security.Principal;
 using System.Security.Policy;
 using System.Security;
+using System.Configuration.Assemblies;
 
 namespace System {
 
@@ -150,7 +151,15 @@ namespace System {
 			
 			throw new NotImplementedException();
 		}
-		
+
+#if NET_1_1
+		[MonoTODO]
+		public static ObjectHandle CreateComInstanceFrom (string assemblyFile, string typeName,
+								  byte []hash, AssemblyHashAlgorithm hashalgo)
+		{
+			throw new NotImplementedException(); 
+		}
+#endif
 
 		public ObjectHandle CreateInstance (string assemblyName, string typeName)
 		{

+ 24 - 1
mcs/class/corlib/System/AppDomainSetup.cs

@@ -31,6 +31,8 @@ namespace System {
 		bool publisher_policy;
 		private bool path_changed;
 		private LoaderOptimization loader_optimization;
+		bool disallow_binding_redirects;
+		bool disallow_code_downloads;
 		
 		[MethodImplAttribute(MethodImplOptions.InternalCall)]
 		private static extern AppDomainSetup InitAppDomainSetup (AppDomainSetup setup);
@@ -193,6 +195,27 @@ namespace System {
 				shadow_copy_files = value;
 			}
 		}
-		
+
+#if NET_1_1
+		public bool DisallowBindingRedirects {
+			get {
+				return disallow_binding_redirects;
+			}
+
+			set {
+				disallow_binding_redirects = value;
+			}
+		}
+
+		public bool DisallowCodeDownload {
+			get {
+				return disallow_code_downloads;
+			}
+
+			set {
+				disallow_code_downloads = value;
+			}
+		}
+#endif
 	}
 }

+ 11 - 0
mcs/class/corlib/System/ChangeLog

@@ -1,3 +1,14 @@
+2003-11-11  Miguel de Icaza  <[email protected]>
+
+	* AppDomain.cs, Activator.cs: New unimplmented entry points from
+	1.1 (Com activation related).
+	
+	* Exception.cs: Formatting.
+	
+	* IServiceProvider.cs: Add ComVisible (true).
+
+	* AppDomainSetup.cs: Add a couple more properties from .NET 1.1 
+
 2003-11-03  Lluis Sanchez Gual <[email protected]>
 
 	* AppDomain.cs: Added some null checks in Load methods. This fixes bug

+ 8 - 3
mcs/class/corlib/System/Exception.cs

@@ -49,13 +49,13 @@ namespace System {
 
 			class_name		= info.GetString ("ClassName");
 			message			= info.GetString ("Message");
-			inner_exception	= (Exception) info.GetValue  ("InnerException", typeof (Exception));
 			help_link		= info.GetString ("HelpURL");
 			stack_trace		= info.GetString ("StackTraceString");
 			remote_stack_trace	= info.GetString ("RemoteStackTrace");
 			remote_stack_index	= info.GetInt32  ("RemoteStackIndex");
-			hresult				= info.GetInt32  ("HResult");
-			source				= info.GetString ("Source");
+			hresult                 = info.GetInt32  ("HResult");
+			source                  = info.GetString ("Source");
+			inner_exception	= (Exception) info.GetValue  ("InnerException", typeof (Exception));
 		}
 
 		public Exception (string msg, Exception e)
@@ -98,6 +98,11 @@ namespace System {
 			}
 		}
 
+		internal void SetMessage (string s)
+		{
+			message = s;
+		}
+		
 		public virtual string Message 
 		{
 			get 

+ 2 - 3
mcs/class/corlib/System/IServiceProvider.cs

@@ -8,13 +8,12 @@
 //
 
 using System;
+using System.Runtime.InteropServices;
 
 namespace System {
 
-//	[ComVisible(false)]
+	[ComVisible(true)]
 	public interface IServiceProvider {
-
 		object GetService (Type serviceType);
-
 	}
 }

+ 2 - 0
mcs/class/corlib/System/_AppDomain.cs

@@ -12,11 +12,13 @@ using System.Reflection;
 using System.Reflection.Emit;
 using System.Globalization;
 using System.Runtime.Remoting;
+using System.Runtime.InteropServices;
 
 namespace System
 {
 
 [CLSCompliant(false)]
+[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
 public interface _AppDomain {
 
 	string BaseDirectory {get; }