dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting Activ


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting ActivatedClientTypeEntry.cs,NONE,1.1 ActivatedServiceTypeEntry.cs,NONE,1.1 IChannelInfo.cs,NONE,1.1 IEnvoyInfo.cs,NONE,1.1 IObjectHandle.cs,NONE,1.1 IRemotingTypeInfo.cs,NONE,1.1 RemotingConfiguration.cs,NONE,1.1 RemotingServices.cs,NONE,1.1 RemotingTimeoutException.cs,NONE,1.1 ServerException.cs,NONE,1.1 SoapServices.cs,NONE,1.1 TypeEntry.cs,NONE,1.1 WellKnownClientTypeEntry.cs,NONE,1.1 WellKnownObjectMode.cs,NONE,1.1 WellKnownServiceTypeEntry.cs,NONE,1.1 ObjRef.cs,1.2,1.3 ObjectHandle.cs,1.3,1.4 RemotingException.cs,1.4,1.5
Date: Thu, 17 Apr 2003 06:36:11 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting
In directory subversions:/tmp/cvs-serv31157/runtime/System/Runtime/Remoting

Modified Files:
        ObjRef.cs ObjectHandle.cs RemotingException.cs 
Added Files:
        ActivatedClientTypeEntry.cs ActivatedServiceTypeEntry.cs 
        IChannelInfo.cs IEnvoyInfo.cs IObjectHandle.cs 
        IRemotingTypeInfo.cs RemotingConfiguration.cs 
        RemotingServices.cs RemotingTimeoutException.cs 
        ServerException.cs SoapServices.cs TypeEntry.cs 
        WellKnownClientTypeEntry.cs WellKnownObjectMode.cs 
        WellKnownServiceTypeEntry.cs 
Log Message:


Stub out a large number of classes under the "System.Runtime.Remoting"
namespace; add the "CONFIG_REMOTING" define to selection compilation of
remoting.


--- NEW FILE ---
/*
 * ActivatedClientTypeEntry.cs - Implementation of the
 *                      "System.Runtime.Remoting.ActivatedClientTypeEntry" 
class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System.Text;
using System.Runtime.Remoting.Contexts;

public class ActivatedClientTypeEntry : TypeEntry
{
        // Internal state.
        private String applicationUrl;
        private IContextAttribute[] contextAttributes;

        // Constructor.
        public ActivatedClientTypeEntry(Type type, String appUrl)
                        {
                                if(type == null)
                                {
                                        throw new ArgumentNullException("type");
                                }
                                if(appUrl == null)
                                {
                                        throw new 
ArgumentNullException("appUrl");
                                }
                                TypeName = type.FullName;
                                AssemblyName = type.Assembly.FullName;
                                applicationUrl = appUrl;
                        }
        public ActivatedClientTypeEntry
                                (String typeName, String assemblyName, String 
appUrl)
                        {
                                if(typeName == null)
                                {
                                        throw new 
ArgumentNullException("typeName");
                                }
                                if(assemblyName == null)
                                {
                                        throw new 
ArgumentNullException("assemblyName");
                                }
                                if(appUrl == null)
                                {
                                        throw new 
ArgumentNullException("appUrl");
                                }
                                TypeName = typeName;
                                AssemblyName = assemblyName;
                                applicationUrl = appUrl;
                        }

        // Get the application URL for this type entry.
        public String ApplicationUrl
                        {
                                get
                                {
                                        return applicationUrl;
                                }
                        }

        // Get or set the context attributes.
        public IContextAttribute[] ContextAttributes
                        {
                                get
                                {
                                        return contextAttributes;
                                }
                                set
                                {
                                        contextAttributes = value;
                                }
                        }

        // Get the object type that corresponds to this client type entry.
        public Type ObjectType
                        {
                                get
                                {
                                        return Type.GetType(TypeName + ", " + 
AssemblyName);
                                }
                        }

        // Convert this object into a string.
        public override String ToString()
                        {
                                StringBuilder builder = new StringBuilder();
                                builder.Append("type='");
                                builder.Append(TypeName);
                                builder.Append(", ");
                                builder.Append(AssemblyName);
                                builder.Append("'; appUrl=");
                                builder.Append(applicationUrl);
                                return builder.ToString();
                        }

}; // class ActivatedClientTypeEntry

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * ActivatedServiceTypeEntry.cs - Implementation of the
 *                      "System.Runtime.Remoting.ActivatedServiceTypeEntry" 
class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System.Text;
using System.Runtime.Remoting.Contexts;

public class ActivatedServiceTypeEntry : TypeEntry
{
        // Internal state.
        private IContextAttribute[] contextAttributes;

        // Constructor.
        public ActivatedServiceTypeEntry(Type type)
                        {
                                if(type == null)
                                {
                                        throw new ArgumentNullException("type");
                                }
                                TypeName = type.FullName;
                                AssemblyName = type.Assembly.FullName;
                        }
        public ActivatedServiceTypeEntry
                                (String typeName, String assemblyName)
                        {
                                if(typeName == null)
                                {
                                        throw new 
ArgumentNullException("typeName");
                                }
                                if(assemblyName == null)
                                {
                                        throw new 
ArgumentNullException("assemblyName");
                                }
                                TypeName = typeName;
                                AssemblyName = assemblyName;
                        }

        // Get or set the context attributes.
        public IContextAttribute[] ContextAttributes
                        {
                                get
                                {
                                        return contextAttributes;
                                }
                                set
                                {
                                        contextAttributes = value;
                                }
                        }

        // Get the object type that corresponds to this service type entry.
        public Type ObjectType
                        {
                                get
                                {
                                        return Type.GetType(TypeName + ", " + 
AssemblyName);
                                }
                        }

        // Convert this object into a string.
        public override String ToString()
                        {
                                StringBuilder builder = new StringBuilder();
                                builder.Append("type='");
                                builder.Append(TypeName);
                                builder.Append(", ");
                                builder.Append(AssemblyName);
                                builder.Append('\'');
                                return builder.ToString();
                        }

}; // class ActivatedServiceTypeEntry

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * IChannelInfo.cs - Implementation of the
 *                      "System.Runtime.Remoting.IChannelInfo" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

public interface IChannelInfo
{
        // Get or set the channel data.
        Object[] ChannelData { get; set; }

}; // interface IChannelInfo

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * IEnvoyInfo.cs - Implementation of the
 *                      "System.Runtime.Remoting.IEnvoyInfo" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System.Runtime.Remoting.Messaging;

public interface IEnvoyInfo
{
        // Get or set the envoy message sink information.
        IMessageSink EnvoySinks { get; set; }

}; // interface IEnvoyInfo

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * IObjectHandle.cs - Implementation of the
 *                      "System.Runtime.Remoting.IObjectHandle" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

public interface IObjectHandle
{
        // Unwrap this handle into an object.
        Object Unwrap();

}; // interface IObjectHandle

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * IRemotingTypeInfo.cs - Implementation of the
 *                      "System.Runtime.Remoting.IRemotingTypeInfo" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

public interface IRemotingTypeInfo
{
        // Get or set the type name.
        String TypeName { get; set; }

        // Determine if we can cast to a the type represented by this interface.
        bool CanCastTo(Type fromType, Object o);

}; // interface IRemotingTypeInfo

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * RemotingConfiguration.cs - Implementation of the
 *                      "System.Runtime.Remoting.RemotingConfiguration" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System.Security.Permissions;

[SecurityPermission(SecurityAction.Demand,
                                        
Flags=SecurityPermissionFlag.RemotingConfiguration)]
public class RemotingConfiguration
{
        // This class cannot be instantiated.
        private RemotingConfiguration() {}

        // Get the identifier for the currently running application
        [TODO]
        public static String ApplicationId
                        {
                                get
                                {
                                        // TODO
                                        return null;
                                }
                        }

        // Get or set the application name.
        [TODO]
        public static String ApplicationName
                        {
                                get
                                {
                                        // TODO
                                        return null;
                                }
                                set
                                {
                                        // TODO
                                }
                        }

        // Get the process ID for the current process.
        [TODO]
        public static String ProcessId
                        {
                                get
                                {
                                        // TODO
                                        return null;
                                }
                        }

        // Read remoting information from a configuration file.
        [TODO]
        public static void Configure(String filename)
                        {
                                // TODO
                        }

        // Get a list of client types that can be activated remotely.
        [TODO]
        public static ActivatedClientTypeEntry[]
                                GetRegisteredActivatedClientTypes()
                        {
                                // TODO
                                return null;
                        }

        // Get a list of service types that can be activated by remote clients.
        [TODO]
        public static ActivatedServiceTypeEntry[]
                                GetRegisteredActivatedServiceTypes()
                        {
                                // TODO
                                return null;
                        }

        // Get a list of well known client types.
        [TODO]
        public static WellKnownClientTypeEntry[]
                                GetRegisteredWellKnownClientTypes()
                        {
                                // TODO
                                return null;
                        }

        // Get a list of well known service types.
        [TODO]
        public static WellKnownServiceTypeEntry[]
                                GetRegisteredWellKnownServiceTypes()
                        {
                                // TODO
                                return null;
                        }

        // Determine if activation is allowed on a type.
        [TODO]
        public static bool IsActivationAllowed(Type svrType)
                        {
                                // TODO
                                return false;
                        }

        // Determine if a type can be remotely activated.
        [TODO]
        public static ActivatedClientTypeEntry
                                IsRemotelyActivatedClientType(Type svrType)
                        {
                                // TODO
                                return null;
                        }
        [TODO]
        public static ActivatedClientTypeEntry
                                IsRemotelyActivatedClientType
                                        (String typeName, String assemblyName)
                        {
                                // TODO
                                return null;
                        }

        // Determine if a type is a well known client type.
        [TODO]
        public static WellKnownClientTypeEntry
                                IsWellKnownClientType(Type svrType)
                        {
                                // TODO
                                return null;
                        }
        [TODO]
        public static WellKnownClientTypeEntry
                                IsWellKnownClientType
                                        (String typeName, String assemblyName)
                        {
                                // TODO
                                return null;
                        }

        // Register a client type that can be activated remotely.
        [TODO]
        public static void RegisterActivatedClientType
                                (ActivatedClientTypeEntry entry)
                        {
                                // TODO
                        }
        public static void RegisterActivatedClientType(Type type, String appUrl)
                        {
                                RegisterActivatedClientType
                                        (new ActivatedClientTypeEntry(type, 
appUrl));
                        }

        // Register a service type that can be activated by a remote client.
        [TODO]
        public static void RegisterActivatedServiceType
                                (ActivatedServiceTypeEntry entry)
                        {
                                // TODO
                        }
        public static void RegisterActivatedServiceType(Type type)
                        {
                                RegisterActivatedServiceType
                                        (new ActivatedServiceTypeEntry(type));
                        }

        // Register a well known client type.
        [TODO]
        public static void RegisterWellKnownClientType
                                (WellKnownClientTypeEntry entry)
                        {
                                // TODO
                        }
        public static void RegisterWellKnownClientType
                                (Type type, String objectUrl)
                        {
                                RegisterWellKnownClientType
                                        (new WellKnownClientTypeEntry(type, 
objectUrl));
                        }

        // Register a well known service type entry.
        [TODO]
        public static void RegisterWellKnownServiceType
                                (WellKnownServiceTypeEntry entry)
                        {
                                // TODO
                        }
        public static void RegisterWellKnownServiceType
                                (Type type, String objectUri, 
WellKnownObjectMode mode)
                        {
                                RegisterWellKnownServiceType
                                        (new WellKnownServiceTypeEntry(type, 
objectUri, mode));
                        }

}; // class RemotingConfiguration

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * RemotingServices.cs - Implementation of the
 *                      "System.Runtime.Remoting.RemotingServices" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System.Reflection;
using System.Runtime.Serialization;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Proxies;

public sealed class RemotingServices
{
        // This class cannot be instantiated.
        private RemotingServices() {}

        // Connect to a service and create a proxy object.
        public static Object Connect(Type classToProxy, String url)
                        {
                                return Connect(classToProxy, url, null);
                        }
        [TODO]
        public static Object Connect(Type classToProxy, String url, Object data)
                        {
                                // TODO
                                return null;
                        }

        // Disconnect an object from all remote accesses.
        [TODO]
        public static bool Disconnect(MarshalByRefObject o)
                        {
                                // TODO
                                return false;
                        }

        // Execute a specific message.
        [TODO]
        public static IMethodReturnMessage ExecuteMessage
                                (MarshalByRefObject target, IMethodCallMessage 
reqMsg)
                        {
                                // TODO
                                return null;
                        }

        // Get the envoy chain for a specific proxy object.
        [TODO]
        public static IMessageSink GetEnvoyChainForProxy
                                (MarshalByRefObject obj)
                        {
                                // TODO
                                return null;
                        }

        // Get a lifetime service object.
        [TODO]
        public static Object GetLifetimeService(MarshalByRefObject obj)
                        {
                                // TODO
                                return null;
                        }

        // Get the method associated with a specific message.
        [TODO]
        public static MethodBase GetMethodBaseFromMethodMessage(IMethodMessage 
msg)
                        {
                                // TODO
                                return null;
                        }

        // Serialize an object.
        [TODO]
        public static void GetObjectData(Object obj, SerializationInfo info,
                                                                         
StreamingContext context)
                        {
                                // TODO
                        }

        // Get the URI for a specific object.
        [TODO]
        public static String GetObjectUri(MarshalByRefObject obj)
                        {
                                // TODO
                                return null;
                        }

        // Get an object reference that represents an object proxy.
        [TODO]
        public static ObjRef GetObjRefForProxy(MarshalByRefObject obj)
                        {
                                // TODO
                                return null;
                        }

        // Get the real proxy underlying a transparent one.
        [TODO]
        public static RealProxy GetRealProxy(Object obj)
                        {
                                // TODO
                                return null;
                        }

        // Get the server type associated with a particular URI.
        [TODO]
        public static Type GetServerTypeForUri(String URI)
                        {
                                // TODO
                                return null;
                        }

        // Get the session ID from a particular message.
        [TODO]
        public static String GetSessionIdForMethodMessage(IMethodMessage msg)
                        {
                                // TODO
                                return null;
                        }

        // Determine if a method is overloaded.
        [TODO]
        public static bool IsMethodOverloaded(IMethodMessage msg)
                        {
                                // TODO
                                return false;
                        }

        // Determine if an object is outside the current application domain.
        [TODO]
        public static bool IsObjectOutOfAppDomain(Object tp)
                        {
                                // TODO
                                return false;
                        }

        // Determine if an object is outside the current context.
        [TODO]
        public static bool IsObjectOutOfContext(Object tp)
                        {
                                // TODO
                                return false;
                        }

        // Determine if a method is one-way.
        [TODO]
        public static bool IsOneWay(MethodBase method)
                        {
                                // TODO
                                return false;
                        }

        // Determine if an object is a transparent proxy.
        [TODO]
        public static bool IsTransparentProxy(Object proxy)
                        {
                                // TODO
                                return false;
                        }

        // Marshal an object.
        public static ObjRef Marshal(MarshalByRefObject Obj)
                        {
                                return Marshal(Obj, null, null);
                        }
        public static ObjRef Marshal(MarshalByRefObject Obj, String URI)
                        {
                                return Marshal(Obj, URI, null);
                        }
        [TODO]
        public static ObjRef Marshal(MarshalByRefObject Obj, String ObjURI,
                                                                 Type 
RequestedType)
                        {
                                // TODO
                                return null;
                        }

        // Set the URI to use to marshal an object.
        [TODO]
        public static void SetObjectUriForMarshal
                                (MarshalByRefObject obj, String uri)
                        {
                                // TODO
                        }

        // Create a proxy for an object reference.
        public static Object Unmarshal(ObjRef objectRef)
                        {
                                return Unmarshal(objectRef, false);
                        }
        [TODO]
        public static Object Unmarshal(ObjRef objectRef, bool fRefine)
                        {
                                // TODO
                                return null;
                        }

}; // class RemotingServices

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * RemotingTimeoutException.cs - Implementation of the
 *              "System.Runtime.Remoting.RemotingTimeoutException" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System;
using System.Runtime.Serialization;

[Serializable]
public class RemotingTimeoutException : RemotingException
{

        // Constructors.
        public RemotingTimeoutException()
                : base(_("Exception_RemotingTimeout")) {}
        public RemotingTimeoutException(String msg)
                : base(msg) {}
        public RemotingTimeoutException(String msg, Exception inner)
                : base(msg, inner) {}
        internal RemotingTimeoutException(SerializationInfo info,
                                                                          
StreamingContext context)
                : base(info, context) {}

        // Get the default message to use for this exception type.
        internal override String MessageDefault
                        {
                                get
                                {
                                        return _("Exception_RemotingTimeout");
                                }
                        }

        // Get the default HResult value for this type of exception.
        internal override uint HResultDefault
                        {
                                get
                                {
                                        return 0x8013150b;
                                }
                        }

}; // class RemotingTimeoutException

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * ServerException.cs - Implementation of the
 *              "System.Runtime.Remoting.ServerException" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System;
using System.Runtime.Serialization;

[Serializable]
public class ServerException : SystemException
{

        // Constructors.
        public ServerException()
                : base(_("Exception_Server")) {}
        public ServerException(String msg)
                : base(msg) {}
        public ServerException(String msg, Exception inner)
                : base(msg, inner) {}
        internal ServerException(SerializationInfo info,
                                                         StreamingContext 
context)
                : base(info, context) {}

        // Get the default message to use for this exception type.
        internal override String MessageDefault
                        {
                                get
                                {
                                        return _("Exception_Server");
                                }
                        }

        // Get the default HResult value for this type of exception.
        internal override uint HResultDefault
                        {
                                get
                                {
                                        return 0x8013150e;
                                }
                        }

}; // class ServerException

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * SoapServices.cs - Implementation of the
 *                      "System.Runtime.Remoting.SoapServices" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System.Reflection;

public class SoapServices
{
        // Cannot create instances of this class.
        private SoapServices() {}

        // Standard namespace prefixes, defined by Microsoft.
        public static String XmlNsForClrType
                        {
                                get
                                {
                                        return 
"http://schemas.microsoft.com/clr/";;
                                }
                        }
        public static String XmlNsForClrTypeWithAssembly
                        {
                                get
                                {
                                        return 
"http://schemas.microsoft.com/clr/assem/";;
                                }
                        }
        public static String XmlNsForClrTypeWithNs
                        {
                                get
                                {
                                        return 
"http://schemas.microsoft.com/clr/ns/";;
                                }
                        }
        public static String XmlNsForClrTypeWithNsAndAssembly
                        {
                                get
                                {
                                        return 
"http://schemas.microsoft.com/clr/nsassem/";;
                                }
                        }

        // Encode SOAP names.
        [TODO]
        public static String CodeXmlNamespaceForClrTypeNamespace
                                (String typeNamespace, String assemblyName)
                        {
                                // TODO
                                return null;
                        }

        // Decode SOAP names.
        [TODO]
        public static bool DecodeXmlNamespaceForClrTypeNamespace
                                (String inNamespace, out String typeNamespace,
                                 out String assemblyName)
                        {
                                // TODO
                                typeNamespace = null;
                                assemblyName = null;
                                return false;
                        }

        // Get field information from SOAP data.
        [TODO]
        public static void GetInteropFieldTypeAndNameFromXmlAttribute
                                (Type containingType, String xmlAttribute,
                                 String xmlNamespace, out Type type, out String 
name)
                        {
                                // TODO
                                type = null;
                                name = null;
                        }
        public static void GetInteropFieldTypeAndNameFromXmlElement
                                (Type containingType, String xmlElement,
                                 String xmlNamespace, out Type type, out String 
name)
                        {
                                // TODO
                                type = null;
                                name = null;
                        }

        // Get type information from SOAP data.
        [TODO]
        public static Type GetInteropTypeFromXmlElement
                                (String xmlElement, String xmlNamespace)
                        {
                                // TODO
                                return null;
                        }
        [TODO]
        public static Type GetInteropTypeFromXmlType
                                (String xmlType, String xmlTypeNamespace)
                        {
                                // TODO
                                return null;
                        }

        // Get the SOAP action associated with a method.
        [TODO]
        public static String GetSoapActionFromMethodBase(MethodBase mb)
                        {
                                // TODO
                                return null;
                        }

        // Get type and method information from a SOAP action.
        [TODO]
        public static bool GetTypeAndMethodNameFromSoapAcion
                                (String soapAction, out String typeName, out 
String methodName)
                        {
                                // TODO
                                typeName = null;
                                methodName = null;
                                return false;
                        }

        // Get the XML element information for serializing a type.
        [TODO]
        public static bool GetXmlElementForInteropType
                                (Type type, out String xmlElement, out String 
xmlNamespace)
                        {
                                // TODO
                                xmlElement = null;
                                xmlNamespace = null;
                                return false;
                        }

        // Get the namespace to use for a method call.
        [TODO]
        public static String GetXmlNamespaceForMethodCall(MethodBase mb)
                        {
                                // TODO
                                return null;
                        }

        // Get the namespace to use for a method response.
        [TODO]
        public static String GetXmlNamespaceForMethodResponse(MethodBase mb)
                        {
                                // TODO
                                return null;
                        }

        // Get XML type information for a type.
        [TODO]
        public static bool GetXmlTypeForInteropType
                                (Type type, out String xmlType, out String 
xmlTypeNamespace)
                        {
                                // TODO
                                xmlType = null;
                                xmlTypeNamespace = null;
                                return false;
                        }

        // Determine if a namespace indicates CLR information.
        public static bool IsClrTypeNamespace(String namespaceString)
                        {
                                if(namespaceString != null)
                                {
                                        return namespaceString.StartsWith
                                                
("http://schemas.microsoft.com/clr/";);
                                }
                                else
                                {
                                        return false;
                                }
                        }

        // Determine if a SOAP action is valid for a method.
        [TODO]
        public static bool IsSoapActionValidForMethodBase
                                (String soapAction, MethodBase mb)
                        {
                                // TODO
                                return false;
                        }

        // Preload SOAP handling information.
        [TODO]
        public static void PreLoad(Assembly assembly)
                        {
                                // TODO
                        }
        [TODO]
        public static void PreLoad(Type type)
                        {
                                // TODO
                        }

        // Register an XML element name with a type.
        [TODO]
        public static void RegisterInteropXmlElement
                                (String xmlElement, String xmlNamespace, Type 
type)
                        {
                                // TODO
                        }

        // Register an XML type name with a type.
        [TODO]
        public static void RegisterInteropXmlType
                                (String xmlType, String xmlTypeNamespace, Type 
type)
                        {
                                // TODO
                        }

        // Register a SOAP action for a method.
        [TODO]
        public static void RegisterSoapActionForMethodBase(MethodBase mb)
                        {
                                // TODO
                        }
        [TODO]
        public static void RegisterSoapActionForMethodBase
                                (MethodBase mb, String soapAction)
                        {
                                // TODO
                        }

}; // class SoapServices

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * TypeEntry.cs - Implementation of the
 *                      "System.Runtime.Remoting.TypeEntry" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

public class TypeEntry
{
        // Internal state.
        private String assemblyName;
        private String typeName;

        // Constructor.
        protected TypeEntry() {}

        // Get or set the assembly name for this type entry.
        public String AssemblyName
                        {
                                get
                                {
                                        return assemblyName;
                                }
                                set
                                {
                                        assemblyName = value;
                                }
                        }

        // Get or set the type name for this type entry.
        public String TypeName
                        {
                                get
                                {
                                        return typeName;
                                }
                                set
                                {
                                        typeName = value;
                                }
                        }

}; // class TypeEntry

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * WellKnownClientTypeEntry.cs - Implementation of the
 *                      "System.Runtime.Remoting.WellKnownClientTypeEntry" 
class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System.Text;

public class WellKnownClientTypeEntry : TypeEntry
{
        // Internal state.
        private String applicationUrl;
        private String objectUrl;

        // Constructor.
        public WellKnownClientTypeEntry(Type type, String objectUrl)
                        {
                                if(type == null)
                                {
                                        throw new ArgumentNullException("type");
                                }
                                if(objectUrl == null)
                                {
                                        throw new 
ArgumentNullException("objectUrl");
                                }
                                TypeName = type.FullName;
                                AssemblyName = type.Assembly.FullName;
                                this.objectUrl = objectUrl;
                        }
        public WellKnownClientTypeEntry
                                (String typeName, String assemblyName, String 
objectUrl)
                        {
                                if(typeName == null)
                                {
                                        throw new 
ArgumentNullException("typeName");
                                }
                                if(assemblyName == null)
                                {
                                        throw new 
ArgumentNullException("assemblyName");
                                }
                                if(objectUrl == null)
                                {
                                        throw new 
ArgumentNullException("objectUrl");
                                }
                                TypeName = typeName;
                                AssemblyName = assemblyName;
                                this.objectUrl = objectUrl;
                        }

        // Get or set the application URL for this type entry.
        public String ApplicationUrl
                        {
                                get
                                {
                                        return applicationUrl;
                                }
                                set
                                {
                                        applicationUrl = value;
                                }
                        }

        // Get the object type that corresponds to this client type entry.
        public Type ObjectType
                        {
                                get
                                {
                                        return Type.GetType(TypeName + ", " + 
AssemblyName);
                                }
                        }

        // Get the object URL for this type entry.
        public String ObjectUrl
                        {
                                get
                                {
                                        return objectUrl;
                                }
                        }

        // Convert this object into a string.
        public override String ToString()
                        {
                                StringBuilder builder = new StringBuilder();
                                builder.Append("type='");
                                builder.Append(TypeName);
                                builder.Append(", ");
                                builder.Append(AssemblyName);
                                builder.Append("'; url=");
                                builder.Append(objectUrl);
                                if(applicationUrl != null)
                                {
                                        builder.Append("; appUrl=");
                                        builder.Append(applicationUrl);
                                }
                                return builder.ToString();
                        }

}; // class WellKnownClientTypeEntry

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * WellKnownObjectMode.cs - Implementation of the
 *                      "System.Runtime.Remoting.WellKnownObjectMode" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

[Serializable]
public enum WellKnownObjectMode
{
        Singleton  = 0x0001,
        SingleCall = 0x0002

}; // enum WellKnownObjectMode

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

--- NEW FILE ---
/*
 * WellKnownServiceTypeEntry.cs - Implementation of the
 *                      "System.Runtime.Remoting.WellKnownServiceTypeEntry" 
class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Runtime.Remoting
{

#if CONFIG_REMOTING

using System.Text;
using System.Runtime.Remoting.Contexts;

public class WellKnownServiceTypeEntry : TypeEntry
{
        // Internal state.
        private IContextAttribute[] contextAttributes;
        private String objectUri;
        private WellKnownObjectMode mode;

        // Constructor.
        public WellKnownServiceTypeEntry(Type type, String objectUri,
                                                                         
WellKnownObjectMode mode)
                        {
                                if(type == null)
                                {
                                        throw new ArgumentNullException("type");
                                }
                                if(objectUri == null)
                                {
                                        throw new 
ArgumentNullException("objectUri");
                                }
                                TypeName = type.FullName;
                                AssemblyName = type.Assembly.FullName;
                                this.objectUri = objectUri;
                                this.mode = mode;
                        }
        public WellKnownServiceTypeEntry
                                (String typeName, String assemblyName, String 
objectUri,
                                 WellKnownObjectMode mode)
                        {
                                if(typeName == null)
                                {
                                        throw new 
ArgumentNullException("typeName");
                                }
                                if(assemblyName == null)
                                {
                                        throw new 
ArgumentNullException("assemblyName");
                                }
                                if(objectUri == null)
                                {
                                        throw new 
ArgumentNullException("objectUri");
                                }
                                TypeName = typeName;
                                AssemblyName = assemblyName;
                                this.objectUri = objectUri;
                                this.mode = mode;
                        }

        // Get or set the context attributes.
        public IContextAttribute[] ContextAttributes
                        {
                                get
                                {
                                        return contextAttributes;
                                }
                                set
                                {
                                        contextAttributes = value;
                                }
                        }

        // Get the service object mode.
        public WellKnownObjectMode Mode
                        {
                                get
                                {
                                        return mode;
                                }
                        }

        // Get the object type that corresponds to this service type entry.
        public Type ObjectType
                        {
                                get
                                {
                                        return Type.GetType(TypeName + ", " + 
AssemblyName);
                                }
                        }

        // Get the object URL for this type entry.
        public String ObjectUri
                        {
                                get
                                {
                                        return objectUri;
                                }
                        }

        // Convert this object into a string.
        public override String ToString()
                        {
                                StringBuilder builder = new StringBuilder();
                                builder.Append("type='");
                                builder.Append(TypeName);
                                builder.Append(", ");
                                builder.Append(AssemblyName);
                                builder.Append("'; objectUri=");
                                builder.Append(objectUri);
                                builder.Append("; mode=");
                                builder.Append(mode.ToString());
                                return builder.ToString();
                        }

}; // class WellKnownServiceTypeEntry

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting

Index: ObjRef.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/ObjRef.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** ObjRef.cs   20 Dec 2001 10:11:39 -0000      1.2
--- ObjRef.cs   17 Apr 2003 10:36:08 -0000      1.3
***************
*** 3,7 ****
   *                    "System.Runtime.Remoting.ObjRef" class.
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 3,7 ----
   *                    "System.Runtime.Remoting.ObjRef" class.
   *
!  * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 23,37 ****
  {
  
! #if !ECMA_COMPAT
  
! [TODO]
! public class ObjRef
! {
  
!       // TODO
  
  }; // class ObjRef
  
! #endif // !ECMA_COMPAT
  
  }; // namespace System.Runtime.Remoting
--- 23,119 ----
  {
  
! #if CONFIG_REMOTING
  
! using System.Runtime.Serialization;
  
! [Serializable]
! public class ObjRef : IObjectReference, ISerializable
! {
!       // Internal state.
!       private IChannelInfo channelInfo;
!       private IEnvoyInfo envoyInfo;
!       private IRemotingTypeInfo typeInfo;
!       private String uri;
! 
!       // Constructors.
!       public ObjRef()
!                       {
!                               // TODO
!                       }
!       public ObjRef(MarshalByRefObject o, Type requestedType)
!                       {
!                               // TODO
!                       }
!       protected ObjRef(SerializationInfo info, StreamingContext context)
!                       {
!                               // TODO
!                       }
! 
!       // Implement the IObjectReference interface.
!       public virtual Object GetRealObject(StreamingContext context)
!                       {
!                               // TODO
!                               return null;
!                       }
! 
!       // Implement the ISerializable interface.
!       public virtual void GetObjectData(SerializationInfo info,
!                                                                         
StreamingContext context)
!                       {
!                               // TODO
!                       }
! 
!       // Determine if the object reference is from this process.
!       public bool IsFromThisProcess()
!                       {
!                               // TODO
!                               return false;
!                       }
! 
!       // Determine if the object reference is from this application domain.
!       public bool IsFromThisAppDomain()
!                       {
!                               // TODO
!                               return false;
!                       }
! 
!       // Object reference properties.
!       public virtual IChannelInfo ChannelInfo
!                       {
!                               get
!                               {
!                                       return channelInfo;
!                               }
!                               set
!                               {
!                                       channelInfo = value;
!                               }
!                       }
!       public virtual IRemotingTypeInfo TypeInfo
!                       {
!                               get
!                               {
!                                       return typeInfo;
!                               }
!                               set
!                               {
!                                       typeInfo = value;
!                               }
!                       }
!       public virtual String URI
!                       {
!                               get
!                               {
!                                       return uri;
!                               }
!                               set
!                               {
!                                       uri = value;
!                               }
!                       }
  
  }; // class ObjRef
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting

Index: ObjectHandle.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/ObjectHandle.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ObjectHandle.cs     28 Nov 2002 22:27:59 -0000      1.3
--- ObjectHandle.cs     17 Apr 2003 10:36:08 -0000      1.4
***************
*** 3,7 ****
   *                    "System.Runtime.Remoting.ObjectHandle" class.
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 3,7 ----
   *                    "System.Runtime.Remoting.ObjectHandle" class.
   *
!  * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 23,28 ****
  {
  
! [TODO]
! public class ObjectHandle
  {
        // Internal state.
--- 23,29 ----
  {
  
! #if CONFIG_REMOTING
! 
! public class ObjectHandle : MarshalByRefObject, IObjectHandle
  {
        // Internal state.
***************
*** 41,47 ****
                        }
  
! // TODO
  
  }; // class ObjectHandle
  
  }; // namespace System.Runtime.Remoting
--- 42,56 ----
                        }
  
!       // Initialize the lifetime service value for this object.
!       [TODO]
!       public override Object InitializeLifetimeService()
!                       {
!                               // TODO
!                               return null;
!                       }
  
  }; // class ObjectHandle
+ 
+ #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting

Index: RemotingException.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/RemotingException.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** RemotingException.cs        7 Apr 2003 04:22:52 -0000       1.4
--- RemotingException.cs        17 Apr 2003 10:36:08 -0000      1.5
***************
*** 23,31 ****
  {
  
! #if !ECMA_COMPAT
  
  using System;
  using System.Runtime.Serialization;
  
  public class RemotingException : SystemException
  {
--- 23,32 ----
  {
  
! #if CONFIG_REMOTING
  
  using System;
  using System.Runtime.Serialization;
  
+ [Serializable]
  public class RemotingException : SystemException
  {
***************
*** 62,66 ****
  }; // class RemotingException
  
! #endif // !ECMA_COMPAT
  
  }; // namespace System.Runtime.Remoting
--- 63,67 ----
  }; // class RemotingException
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting





reply via email to

[Prev in Thread] Current Thread [Next in Thread]