2 // System.Runtime.Remoting.IRemotingTypeInfo.cs
4 // AUthor: Duncan Mak (duncan@ximian.com)
6 // 2002 (C) Copyright. Ximian, Inc.
9 using System.Reflection;
10 using System.Runtime.Remoting.Messaging;
12 namespace System.Runtime.Remoting {
14 public interface IRemotingTypeInfo
16 string TypeName { get; set; }
17 bool CanCastTo (Type fromType, object o);
20 // fixme: dont know if we really need this
21 internal class RemotingTypeInfo : IRemotingTypeInfo
26 public RemotingTypeInfo (Type type)
28 type_name = type.AssemblyQualifiedName;
31 public string TypeName {
42 public Type GetRealType ()
44 string type_name = null;
45 Assembly assembly = null;
47 int pos = type_name.IndexOf (",");
50 string ass_name = type_name.Substring (0, pos - 1);
51 assembly = Assembly.Load (ass_name);
53 type_name = type_name.Substring (pos + 1);
55 return assembly.GetType (type_name);
58 public bool CanCastTo (Type fromType, object o)