diff options
| author | mo k <mo@mokhan.ca> | 2012-05-03 12:44:39 -0600 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-05-03 12:44:39 -0600 |
| commit | 2ea2730e65af8e7849c6f36443f87e8731ffd5be (patch) | |
| tree | 3b9455098690e0038d0f04754b4c34a91cd34162 /proxies/Program.cs | |
initial checkin.main
Diffstat (limited to 'proxies/Program.cs')
| -rw-r--r-- | proxies/Program.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/proxies/Program.cs b/proxies/Program.cs new file mode 100644 index 0000000..511f45a --- /dev/null +++ b/proxies/Program.cs @@ -0,0 +1,25 @@ +using System;
+
+namespace proxies
+{
+ internal class Program
+ {
+ private static void Main(string[] args)
+ {
+ var marshal_mathers = new Person("marshall mathers");
+ var some_celebrity = ProxyFactory.Create<IPerson>(marshal_mathers, new MyNameIsSlimShadyInterceptor());
+
+ try
+ {
+ var name = some_celebrity.what_is_your_name();
+ name.should_be_equal_to("slim shady");
+ }
+ catch (Exception e)
+ {
+ Console.Out.WriteLine(e);
+ }
+ Console.Out.WriteLine("will the real slim shady please stand up...");
+ Console.In.ReadLine();
+ }
+ }
+}
\ No newline at end of file |
