SpecificRequest() public method

public SpecificRequest ( ) : void
return void
コード例 #1
0
            public void Request()
            {
                // Possibly do some other work and then call SpecificRequest
                Adaptee adaptee = new Adaptee();

                adaptee.SpecificRequest();
            }
コード例 #2
0
ファイル: Program.cs プロジェクト: SanekGt/Adapter
 public override void Request()
 {
     // Possibly do some other work
     // and then call SpecificRequest
     adaptee.SpecificRequest();
     adaptee.SpecificRequest2();
 }
コード例 #3
0
ファイル: Adapter.cs プロジェクト: rinechran/programLab
        static void Main(string[] args)
        {
            // Showing the Adapteee in standalone mode
            Adaptee first = new Adaptee();
            Console.Write("Before the new standard\nPrecise reading: ");
            Console.WriteLine(first.SpecificRequest(5, 3));

            // What the client really wants
            ITarget second = new Adapter();
            Console.WriteLine("\nMoving to the new standard");
            Console.WriteLine(second.Request(5));
        }
コード例 #4
0
        static void Main(string[] args)
        {
            var first = new Adaptee();

            Console.Write("Before the new standard\nPrecise reading: ");
            Console.WriteLine(first.SpecificRequest(5, 3));
            ITarget second = new Adapter();

            Console.WriteLine("\nMoving to the new standard");
            Console.WriteLine(second.Request(5));

            Console.ReadLine();
        }
コード例 #5
0
        private static void Main()
        {
            //adaptee in standalone mode
            var adaptee = new Adaptee();

            Console.WriteLine("Before the new standard\nPrecise reading: ");
            Console.WriteLine(adaptee.SpecificRequest(5, 3));

            //What the client really wants
            ITarget adapter = new Adapter();

            Console.WriteLine("\nMoving to the new standard");
            Console.WriteLine(adapter.Request(5));
        }
コード例 #6
0
ファイル: Adapter.cs プロジェクト: mohamad3li/Design-Patterns
 public void Request()
 {
     adaptee.SpecificRequest();
 }
コード例 #7
0
ファイル: Adapter.cs プロジェクト: Sleeeeeepy/DesignPattern
 public void Request()
 {
     adaptee.SpecificRequest();
     Console.Write("\n\\n using Adapter.Request()\n");
 }
コード例 #8
0
 public override void Request()
 {
     _adaptee.SpecificRequest();
 }
コード例 #9
0
 // delegação simples repassa a chamada ao adaptee
 public override string Request()
 {
     // chamada de método de interface diferente
     return(_adaptee.SpecificRequest());
 }
コード例 #10
0
 public override void Request()
 {
     Console.WriteLine("Adapter.Request()");
     Console.WriteLine("Redirecting Requet To the Adaptee...");
     adaptee.SpecificRequest();
 }
コード例 #11
0
 // delegação simples repassa a chamada ao adaptee
 public override void Request()
 {
     // chamada de método de interface diferente
     _adaptee.SpecificRequest();
 }