Merge branch 'master'
[mono.git] / mcs / class / corlib / System.Runtime.Remoting / Identity.cs
index f48a4fb150d26cf50793329c4208da83d87395b6..608798ccbabdbf1546c4cec75cad585a171985ae 100644 (file)
@@ -6,6 +6,29 @@
 // (C) 2002, Lluis Sanchez Gual
 //
 
+//
+// Copyright (C) 2004 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
 using System.Runtime.Remoting.Messaging;
 using System.Runtime.Remoting.Proxies;
 using System.Runtime.Remoting.Contexts;
@@ -21,8 +44,6 @@ namespace System.Runtime.Remoting
                // and also to store server side information (information
                // about how to dispatch messages to the object in the server).
 
-               protected Type _objectType;
-
                // URI of the object
                protected string _objectUri;
 
@@ -42,10 +63,9 @@ namespace System.Runtime.Remoting
                // dispose the identity twice.
                bool _disposed = false;
 
-               public Identity(string objectUri, Type objectType)
+               public Identity(string objectUri)
                {
                        _objectUri = objectUri;
-                       _objectType = objectType;
                }
 
                public abstract ObjRef CreateObjRef (Type requestedType);
@@ -69,11 +89,6 @@ namespace System.Runtime.Remoting
                        get { return _envoySink; }
                }
 
-               public Type ObjectType
-               {
-                       get { return _objectType; }
-               }
-
                public string ObjectUri
                {
                        get { return _objectUri; }
@@ -88,7 +103,7 @@ namespace System.Runtime.Remoting
                public bool Disposed
                {
                        get { return _disposed; }
-                       set { _disposed = true; }
+                       set { _disposed = value; }
                }
 
                public DynamicPropertyCollection ClientDynamicProperties
@@ -134,7 +149,7 @@ namespace System.Runtime.Remoting
        {
                WeakReference _proxyReference;
 
-               public ClientIdentity (string objectUri, ObjRef objRef): base (objectUri, Type.GetType (objRef.TypeInfo.TypeName,true))
+               public ClientIdentity (string objectUri, ObjRef objRef): base (objectUri)
                {
                        _objRef = objRef;
                        _envoySink = (_objRef.EnvoyInfo != null) ? _objRef.EnvoyInfo.EnvoySinks : null;