2 using System.Collections;
3 using System.Runtime.Remoting;
5 public class Foo : System.ContextBoundObject {
8 public class Bar : System.ContextBoundObject {
10 public void Test(Foo f) {
11 if (RemotingServices.IsTransparentProxy (f))
12 Console.WriteLine ("Bar::Test(Foo) Is TP");
14 Console.WriteLine ("Bar::Test(Foo) Is NOT a TP (error!)");
17 Console.WriteLine ("Bar::Test(Foo) f.Equals (b) failed (error!)");
19 Console.WriteLine ("Bar::Test(Foo) f.Equals (f) ok!");
24 public static void Main (string[] args) {
29 Console.WriteLine ("b.Equals (b) failed (error!)");
31 Console.WriteLine ("b.Equals (b) ok!");
33 if (RemotingServices.IsTransparentProxy (b))
34 Console.WriteLine ("b is a TP");
36 Console.WriteLine ("b is NOT a TP (error!)");
41 Console.WriteLine ("f.Equals (b) failed (error!)");
43 Console.WriteLine ("f.Equals (f) ok!");
45 Console.WriteLine ("test end.");