コード例 #1
0
 public void Paint3DShape(D3Shape s)
 {
     foreach (D2Shape d2 in s.GetD2Shapes())
     {
         d2Painter.Paint2DShape(d2);
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: dotnet31102018/05.02.2020
        static void Main(string[] args)
        {
            D3Shape d3Shape = new D3Shape();

            draw(new Adapter3Dto2D(), d3Shape);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: dotnet31102018/05.02.2020
 // non mutable
 private static void draw(ID3Painter painter, D3Shape shape)
 {
     painter.Paint3DShape(shape);
 }
コード例 #4
0
 public void Paint3DShape(D3Shape s)
 {
     Console.WriteLine("D3 is printing not so nice ... " + s);
 }