SpecificRequest() 공개 메소드

public SpecificRequest ( ) : void
리턴 void
            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
        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
 public void Request()
 {
     adaptee.SpecificRequest();
 }
예제 #7
0
 public void Request()
 {
     adaptee.SpecificRequest();
     Console.Write("\n\\n using Adapter.Request()\n");
 }
 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();
 }