2002-08-02 Duncan Mak <duncan@ximian.com>
[mono.git] / mcs / class / corlib / System.Runtime.Remoting / ActivatedServiceTypeEntry.cs
1 //
2 // System.Runtime.Remoting.ActivatedServiceTypeEntry.cs
3 //
4 // AUthor: Duncan Mak  (duncan@ximian.com)
5 //
6 // 2002 (C) Copyright. Ximian, Inc.
7 //
8
9 using System;
10 using System.Reflection;
11 using System.Runtime.Remoting;
12 using System.Runtime.Remoting.Contexts;
13
14 namespace System.Runtime.Remoting {
15
16         public class ActivatedServiceTypeEntry : TypeEntry
17         {
18                 Type obj_type;
19                 
20                 public ActivatedServiceTypeEntry (Type type)                    
21                 {
22                         AssemblyName = type.Assembly.FullName;
23                         TypeName = type.FullName;
24                         obj_type = type;
25                 }
26
27                 public ActivatedServiceTypeEntry (string typeName, string assemblyName)
28                 {
29                         AssemblyName = assemblyName;
30                         TypeName = typeName;
31                         Assembly a = Assembly.Load (assemblyName);
32                         obj_type = a.GetType (typeName);
33                 }
34                 
35                 public IContextAttribute [] ContextAttributes {
36                         get { return null; }
37                         set { } // This is not implemented in the MS runtime yet.
38                 }
39
40                 public Type ObjectType {
41                         get { return obj_type; }
42                 }
43
44                 [MonoTODO]
45                 public override string ToString ()
46                 {
47                         return AssemblyName + TypeName;
48                 }
49         }
50 }