I took some time today to pull down the source code for SvnBridge today, and man, I was blown away. I started at Program.cs and made it to line 25 Bootstrapper.Start(). From there I went on to look at the hand rolled container, then the ProxyFactory.

In order for me to fully grasp the System.Runtime.Remoting API for creating proxies I had to re-write the code from SVN Bridge.... I just had too... it's just how I learn. It's like tracing over cartoons when you're a kid. I still do it!

In case you're interested, the attached code is the sample I put together that is derived from the source code of SvnBridge. If you haven't checked out the source for the project, you really should.

Pretty cool stuff.... Hopefully, this helps out anyone else who's just as curious

My reduced sample source code...

 1 private static void Main(string[] args)
 2   {
 3     var marshal_mathers = new Person("marshall mathers");
 4     var some_celebrity = ProxyFactory.CreateIPerson>(marshal_mathers, new MyNameIsSlimShadyInterceptor());
 6     try
 7     {
 8       var name = some_celebrity.what_is_your_name();
 9       name.should_be_equal_to("slim shady");
10     }
11     catch (Exception e)
12     {
13       Console.Out.WriteLine(e);
14     }
15     Console.Out.WriteLine("will the real slim shady please stand up...");
16     Console.In.ReadLine();
17   }
comments powered by Disqus