channel example implementation
[mono.git] / mcs / class / corlib / System.Runtime.Remoting / ObjRef.cs
1 //
2 // System.Runtime.Remoting.ObjRef.cs
3 //
4 // Author:
5 //   Miguel de Icaza (miguel@ximian.com)
6 //   Dietmar Maurer (dietmar@ximian.com)
7 //
8 // (C) Ximian, Inc.  http://www.ximian.com
9 //
10 //
11 // FIXME: This is just a skeleton for practical purposes.
12 //
13
14 using System;
15 using System.Runtime.Serialization;
16
17 namespace System.Runtime.Remoting {
18
19         [Serializable]
20         public class ObjRef : IObjectReference, ISerializable {
21                 MarshalByRefObject mbr;
22                 SerializationInfo si;
23                 string uri;
24                 Type type;
25                 
26                 public ObjRef ()
27                 {
28                 }
29                 
30                 public ObjRef (MarshalByRefObject mbr, Type type)
31                 {
32                         this.mbr = mbr;
33                         this.type = type;
34                 }
35
36                 [MonoTODO]
37                 protected ObjRef (SerializationInfo si, StreamingContext sc)
38                 {
39                         // FIXME: Implement.
40                         //
41                         // This encarnates the object from serialized data.
42                 }
43
44                 [MonoTODO]
45                 public virtual IChannelInfo ChannelInfo {
46                         get {
47                                 throw new NotImplementedException ();
48                         }
49                         set {
50                                 throw new NotImplementedException ();
51                         }
52                 }
53                 
54                 [MonoTODO]
55                 public virtual IEnvoyInfo EnvoyInfo {
56                         get {
57                                 throw new NotImplementedException ();
58                         }
59                         set {
60                                 throw new NotImplementedException ();
61                         }
62                 }
63                 
64                 [MonoTODO]
65                 public virtual IRemotingTypeInfo TypeInfo {
66                         get {
67                                 throw new NotImplementedException ();
68                         }
69                         set {
70                                 throw new NotImplementedException ();
71                         }
72                 }
73                 
74                 public virtual string URI {
75                         get {
76                                 return uri;
77                         }
78                         set {
79                                 uri = value;
80                         }
81                 }
82
83                 [MonoTODO]
84                 public virtual void GetObjectData (SerializationInfo si, StreamingContext sc)
85                 {
86                         // FIXME:
87                 }
88
89                 [MonoTODO]
90                 public virtual object GetRealObject (StreamingContext sc)
91                 {
92                         // FIXME:
93                         
94                         return null;
95                 }
96
97                 [MonoTODO]
98                 public bool IsFromThisAppDomain ()
99                 {
100                         // FIXME:
101                         
102                         return true;
103                 }
104
105                 [MonoTODO]
106                 public bool IsFromThisProcess ()
107                 {
108                         // FIXME:
109                         
110                         return true;
111                 }
112         }
113 }