コード例 #1
0
ファイル: Program.cs プロジェクト: GLewKK/TMPS
        static void Main(string[] args)
        {
            var    subsystem1 = new Subsystem1();
            var    subsystem2 = new Subsystem2();
            var    subsystem3 = new Subsystem3();
            Facade facade     = new Facade(subsystem1, subsystem2, subsystem3);

            Client.ClientCode(facade);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Console.Write("BASIC IMPLEMENTATION \n");
            // The client code may have some of the subsystem's objects already
            // created. In this case, it might be worthwhile to initialize the
            // Facade with these objects instead of letting the Facade create
            // new instances.
            Subsystem1 subsystem1 = new Subsystem1();
            Subsystem2 subsystem2 = new Subsystem2();
            Facade     facade     = new Facade(subsystem1, subsystem2);

            Client.ClientCode(facade);

            Console.Write("VideoConversionFacade \n");
            VideoConversionFacade converter = new VideoConversionFacade();
            VideoFile             mp4Video  = converter.ConvertVideo("youtubevideo.ogg", "mp4");
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: GLewKK/TMPS
 public Facade(Subsystem1 subsystem1, Subsystem2 subsystem2, Subsystem3 subsystem3)
 {
     _subsystem1 = subsystem1;
     _subsystem2 = subsystem2;
     _subsystem3 = subsystem3;
 }