DesignPattern_Structural_Proxy

void Main()
{
    IShow proxy = new Proxy();
    proxy.Show();
}

interface IShow{
    void Show();
}
class Target:IShow{
    public void Show(){}
}
class Proxy:IShow{
    Target target = new Target();
    public void Show(){
        target.Show();
    }
}
时间: 2024-08-15 10:43:00

DesignPattern_Structural_Proxy的相关文章