using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Class1
{
public static void Main()
{
Proxy p = new Proxy();
p.DoYourStuff();
Console.Read();
}
}
abstract class ProxyBase
{
public abstract void DoYourStuff();
}
class Subject : ProxyBase
{
public override void DoYourStuff()
{
Console.WriteLine("do my job");
}
}
class Proxy : ProxyBase
{
Subject s;
public override void DoYourStuff()
{
if (s == null)
{
s = new Subject();
}
s.DoYourStuff();
//throw new NotImplementedException();
}
}
}