SpecificRequest() public méthode

public SpecificRequest ( ) : void
Résultat void
            public void Request()
            {
                // Possibly do some other work and then call SpecificRequest
                Adaptee adaptee = new Adaptee();

                adaptee.SpecificRequest();
            }
Exemple #2
0
 public override void Request()
 {
     // Possibly do some other work
     // and then call SpecificRequest
     adaptee.SpecificRequest();
     adaptee.SpecificRequest2();
 }
Exemple #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));
        }
Exemple #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();
        }
        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));
        }
 public void Request()
 {
     adaptee.SpecificRequest();
 }
Exemple #7
0
 public void Request()
 {
     adaptee.SpecificRequest();
     Console.Write("\n\\n using Adapter.Request()\n");
 }
 public override void Request()
 {
     _adaptee.SpecificRequest();
 }
Exemple #9
0
 // delegação simples repassa a chamada ao adaptee
 public override string Request()
 {
     // chamada de método de interface diferente
     return(_adaptee.SpecificRequest());
 }
Exemple #10
0
 public override void Request()
 {
     Console.WriteLine("Adapter.Request()");
     Console.WriteLine("Redirecting Requet To the Adaptee...");
     adaptee.SpecificRequest();
 }
Exemple #11
0
 // delegação simples repassa a chamada ao adaptee
 public override void Request()
 {
     // chamada de método de interface diferente
     _adaptee.SpecificRequest();
 }