From 6fc94963a624ed11de43be7d73971c3640faf945 Mon Sep 17 00:00:00 2001 From: Duncan Mak Date: Tue, 30 Jul 2002 19:05:13 +0000 Subject: [PATCH] 2002-07-31 Duncan Mak * unix.args: Added new Exceptions, Interfaces and various TypeEntries from System.Runtime.Remoting. * TypeEntry.cs: * ActivatedClientTypeEntry.cs: * ActivatedServiceTypeEntry.cs: * WellKnownClientTypeEntry.cs: * WellKnownServiceTypeEntry.cs: Added all the classes derived from TypeEntry. * RemotingException.cs: * RemotingTimeoutException.cs: * ServerException.cs: Added missing exceptions. * IChannelInfo.cs: * IEnvoyInfo.cs: * IRemotingTypeInfo.cs: Added missing interfaces. svn path=/trunk/mcs/; revision=6263 --- mcs/class/corlib/ChangeLog | 5 ++ .../ActivatedClientTypeEntry.cs | 41 ++++++++++++ .../ActivatedServiceTypeEntry.cs | 44 +++++++++++++ .../corlib/System.Runtime.Remoting/ChangeLog | 16 +++++ .../System.Runtime.Remoting/IChannelInfo.cs | 17 +++++ .../System.Runtime.Remoting/IEnvoyInfo.cs | 17 +++++ .../IRemotingTypeInfo.cs | 18 +++++ .../RemotingException.cs | 37 +++++++++++ .../RemotingTimeoutException.cs | 32 +++++++++ .../ServerException.cs | 32 +++++++++ .../System.Runtime.Remoting/TypeEntry.cs | 32 +++++++++ .../WellKnownClientTypeEntry.cs | 58 ++++++++++++++++ .../WellKnownServiceTypeEntry.cs | 66 +++++++++++++++++++ mcs/class/corlib/unix.args | 11 ++++ 14 files changed, 426 insertions(+) create mode 100644 mcs/class/corlib/System.Runtime.Remoting/ActivatedClientTypeEntry.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/ActivatedServiceTypeEntry.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/IChannelInfo.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/IEnvoyInfo.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/IRemotingTypeInfo.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/RemotingException.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/RemotingTimeoutException.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/ServerException.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/TypeEntry.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/WellKnownClientTypeEntry.cs create mode 100644 mcs/class/corlib/System.Runtime.Remoting/WellKnownServiceTypeEntry.cs diff --git a/mcs/class/corlib/ChangeLog b/mcs/class/corlib/ChangeLog index 345cd72875c..a942b83a194 100644 --- a/mcs/class/corlib/ChangeLog +++ b/mcs/class/corlib/ChangeLog @@ -1,3 +1,8 @@ +2002-07-31 Duncan Mak + + * unix.args: Added new Exceptions, Interfaces and various + TypeEntries from System.Runtime.Remoting. + 2002-07-29 Martin Baulig * list: Removed, this isn't used anymore and people are already diff --git a/mcs/class/corlib/System.Runtime.Remoting/ActivatedClientTypeEntry.cs b/mcs/class/corlib/System.Runtime.Remoting/ActivatedClientTypeEntry.cs new file mode 100644 index 00000000000..eb0decaf501 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/ActivatedClientTypeEntry.cs @@ -0,0 +1,41 @@ +// +// System.Runtime.Remoting.ActivatedClientTypeEntry.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Contexts; + +namespace System.Runtime.Remoting { + + public class ActivatedClientTypeEntry : TypeEntry + { + string url; + Type obj_type; + + public ActivatedClientTypeEntry (Type type, string appUrl) + { + AssemblyName = type.Assembly.FullName; + TypeName = type.FullName; + url = appUrl; + obj_type = type; + } + + public string ApplicationUrl { + get { return url; } + } + + public IContextAttribute [] ContextAttributes { + get { return null; } + set { } // This is not implemented in the MS runtime yet. + } + + public Type ObjectType { + get { return obj_type; } + } + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/ActivatedServiceTypeEntry.cs b/mcs/class/corlib/System.Runtime.Remoting/ActivatedServiceTypeEntry.cs new file mode 100644 index 00000000000..e0736ec137f --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/ActivatedServiceTypeEntry.cs @@ -0,0 +1,44 @@ +// +// System.Runtime.Remoting.ActivatedServiceTypeEntry.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System; +using System.Reflection; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Contexts; + +namespace System.Runtime.Remoting { + + public class ActivatedServiceTypeEntry : TypeEntry + { + Type obj_type; + + public ActivatedServiceTypeEntry (Type type) + { + AssemblyName = type.Assembly.FullName; + TypeName = type.FullName; + obj_type = type; + } + + public ActivatedServiceTypeEntry (string typeName, string assemblyName) + { + AssemblyName = assemblyName; + TypeName = typeName; + Assembly a = Assembly.Load (assemblyName); + obj_type = a.GetType (typeName); + } + + public IContextAttribute [] ContextAttributes { + get { return null; } + set { } // This is not implemented in the MS runtime yet. + } + + public Type ObjectType { + get { return obj_type; } + } + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog index b33d476a84a..c9e792101f2 100755 --- a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog +++ b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog @@ -1,3 +1,19 @@ +2002-07-31 Duncan Mak + + * TypeEntry.cs: + * ActivatedClientTypeEntry.cs: + * ActivatedServiceTypeEntry.cs: + * WellKnownClientTypeEntry.cs: + * WellKnownServiceTypeEntry.cs: Added all the classes derived from TypeEntry. + + * RemotingException.cs: + * RemotingTimeoutException.cs: + * ServerException.cs: Added missing exceptions. + + * IChannelInfo.cs: + * IEnvoyInfo.cs: + * IRemotingTypeInfo.cs: Added missing interfaces. + 2002-07-24 Duncan Mak * LeaseState.cs: Moved to System.Runtime.Remoting.Lifetime. diff --git a/mcs/class/corlib/System.Runtime.Remoting/IChannelInfo.cs b/mcs/class/corlib/System.Runtime.Remoting/IChannelInfo.cs new file mode 100644 index 00000000000..643d56955f0 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/IChannelInfo.cs @@ -0,0 +1,17 @@ +// +// System.Runtime.Remoting.IChannelInfo.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System; + +namespace System.Runtime.Remoting { + + public interface IChannelInfo + { + object[] ChannelData { get; set; } + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/IEnvoyInfo.cs b/mcs/class/corlib/System.Runtime.Remoting/IEnvoyInfo.cs new file mode 100644 index 00000000000..d66709ae621 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/IEnvoyInfo.cs @@ -0,0 +1,17 @@ +// +// System.Runtime.Remoting.IEnvoyInfo.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System.Runtime.Remoting.Messaging; + +namespace System.Runtime.Remoting { + + public interface IEnvoyInfo + { + IMessageSink EnvoySinks { get; set; } + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/IRemotingTypeInfo.cs b/mcs/class/corlib/System.Runtime.Remoting/IRemotingTypeInfo.cs new file mode 100644 index 00000000000..eb4e9d314f8 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/IRemotingTypeInfo.cs @@ -0,0 +1,18 @@ +// +// System.Runtime.Remoting.IRemotingTypeInfo.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System.Runtime.Remoting.Messaging; + +namespace System.Runtime.Remoting { + + public interface IRemotingTypeInfo + { + string TypeName { get; set; } + bool CanCastTo (Type fromType, object o); + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingException.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingException.cs new file mode 100644 index 00000000000..eb23b42d914 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingException.cs @@ -0,0 +1,37 @@ +// +// System.Runtime.Remoting.RemotingException.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System; +using System.Runtime.Serialization; + +namespace System.Runtime.Remoting { + + [Serializable] + public class RemotingException : Exception + { + public RemotingException () + : base () + { + } + + public RemotingException (string message) + : base (message) + { + } + + protected RemotingException (SerializationInfo info, StreamingContext context) + : base (info, context) + { + } + + public RemotingException (string message, Exception ex) + : base (message, ex) + { + } + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingTimeoutException.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingTimeoutException.cs new file mode 100644 index 00000000000..af2f4462c03 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingTimeoutException.cs @@ -0,0 +1,32 @@ +// +// System.Runtime.Remoting.RemotingTimeoutException.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System; +using System.Runtime.Serialization; + +namespace System.Runtime.Remoting { + + [Serializable] + public class RemotingTimeoutException : RemotingException + { + public RemotingTimeoutException () + : base () + { + } + + public RemotingTimeoutException (string message) + : base (message) + { + } + + public RemotingTimeoutException (string message, Exception ex) + : base (message, ex) + { + } + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/ServerException.cs b/mcs/class/corlib/System.Runtime.Remoting/ServerException.cs new file mode 100644 index 00000000000..becfb5d6c6e --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/ServerException.cs @@ -0,0 +1,32 @@ +// +// System.Runtime.Remoting.ServerException.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System; +using System.Runtime.Serialization; + +namespace System.Runtime.Remoting { + + [Serializable] + public class ServerException : SystemException + { + public ServerException () + : base () + { + } + + public ServerException (string message) + : base (message) + { + } + + public ServerException (string message, Exception ex) + : base (message, ex) + { + } + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/TypeEntry.cs b/mcs/class/corlib/System.Runtime.Remoting/TypeEntry.cs new file mode 100644 index 00000000000..a39e848f7fc --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/TypeEntry.cs @@ -0,0 +1,32 @@ +// +// System.Runtime.Remoting.TypeEntry.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System; + +namespace System.Runtime.Remoting { + + public class TypeEntry + { + string assembly_name; + string type_name; + + protected TypeEntry () + { + } + + public string AssemblyName { + get { return assembly_name; } + set { assembly_name = value; } + } + + public string TypeName { + get { return type_name; } + set { type_name = value; } + } + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/WellKnownClientTypeEntry.cs b/mcs/class/corlib/System.Runtime.Remoting/WellKnownClientTypeEntry.cs new file mode 100644 index 00000000000..84ec479ede8 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/WellKnownClientTypeEntry.cs @@ -0,0 +1,58 @@ +// +// System.Runtime.Remoting.WellKnownClientTypeEntry.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System; +using System.Reflection; + +namespace System.Runtime.Remoting { + + public class WellKnownClientTypeEntry : TypeEntry + { + Type obj_type; + string obj_url; + string app_url = null; + + public WellKnownClientTypeEntry (Type type, string objectUrl ) + { + AssemblyName = type.Assembly.FullName; + TypeName = type.FullName; + obj_type = type; + obj_url = objectUrl; + } + + public WellKnownClientTypeEntry (string typeName, string assemblyName, string objectUrl) + { + AssemblyName = assemblyName; + TypeName = typeName; + Assembly a = Assembly.Load (assemblyName); + obj_type = a.GetType (typeName); + } + + public string ApplicationUrl { + get { return app_url; } + set { app_url = value; } + } + + public Type ObjectType { + get { return obj_type; } + } + + public string ObjectUrl { + get { return obj_url; } + set { obj_url = value; } + } + + public override string ToString () + { + if (ApplicationUrl != null) + return TypeName + AssemblyName + ObjectUrl + ApplicationUrl; + else + return TypeName + AssemblyName + ObjectUrl; + } + } +} diff --git a/mcs/class/corlib/System.Runtime.Remoting/WellKnownServiceTypeEntry.cs b/mcs/class/corlib/System.Runtime.Remoting/WellKnownServiceTypeEntry.cs new file mode 100644 index 00000000000..85a26832556 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.Remoting/WellKnownServiceTypeEntry.cs @@ -0,0 +1,66 @@ +// +// System.Runtime.Remoting.WellKnownServiceTypeEntry.cs +// +// AUthor: Duncan Mak (duncan@ximian.com) +// +// 2002 (C) Copyright. Ximian, Inc. +// + +using System; +using System.Reflection; +using System.Runtime.Remoting.Contexts; + +namespace System.Runtime.Remoting { + + public class WellKnownServiceTypeEntry : TypeEntry + { + Type obj_type; + string obj_uri; + WellKnownObjectMode obj_mode; + + public WellKnownServiceTypeEntry (Type type, string objectUri, WellKnownObjectMode mode) + { + AssemblyName = type.Assembly.FullName; + TypeName = type.FullName; + obj_type = type; + obj_uri = objectUri; + obj_mode = mode; + } + + public WellKnownServiceTypeEntry (string typeName, string assemblyName, + string objectUri, WellKnownObjectMode mode) + { + AssemblyName = assemblyName; + TypeName = typeName; + Assembly a = Assembly.Load (assemblyName); + obj_type = a.GetType (typeName); + obj_uri = objectUri; + obj_mode = mode; + } + + public IContextAttribute [] ContextAttributes { + get { return null; } + set { } // This is not implemented in the MS runtime yet. + } + + public WellKnownObjectMode Mode { + get { return obj_mode; } + set { obj_mode = value; } + } + + public Type ObjectType { + get { return obj_type; } + } + + public string ObjectUri { + get { return obj_uri; } + set { obj_uri = value; } + } + + [MonoTODO] + public override string ToString () + { + return TypeName + AssemblyName + ObjectUri; + } + } +} diff --git a/mcs/class/corlib/unix.args b/mcs/class/corlib/unix.args index e15ee436e1c..dd9e7314f10 100755 --- a/mcs/class/corlib/unix.args +++ b/mcs/class/corlib/unix.args @@ -436,11 +436,22 @@ System.Runtime.InteropServices/UCOMTypeInfo.cs System.Runtime.InteropServices/UCOMTypeLib.cs System.Runtime.InteropServices/UnmanagedType.cs System.Runtime.InteropServices/VarEnum.cs +System.Runtime.Remoting/ActivatedClientTypeEntry.cs +System.Runtime.Remoting/ActivatedServiceTypeEntry.cs System.Runtime.Remoting/IObjectHandle.cs +System.Runtime.Remoting/IChannelInfo.cs +System.Runtime.Remoting/IEnvoyInfo.cs +System.Runtime.Remoting/IRemotingTypeInfo.cs System.Runtime.Remoting/ObjectHandle.cs System.Runtime.Remoting/ObjRef.cs +System.Runtime.Remoting/RemotingException.cs +System.Runtime.Remoting/RemotingTimeoutException.cs System.Runtime.Remoting/RemotingServices.cs +System.Runtime.Remoting/ServerException.cs +System.Runtime.Remoting/TypeEntry.cs System.Runtime.Remoting/WellKnownObjectMode.cs +System.Runtime.Remoting/WellKnownClientTypeEntry.cs +System.Runtime.Remoting/WellKnownServiceTypeEntry.cs System.Runtime.Remoting.Activation/ActivatorLevel.cs System.Runtime.Remoting.Activation/IActivator.cs System.Runtime.Remoting.Activation/IConstructionCallMessage.cs -- 2.25.1