Request() public method

public Request ( ) : void
return void
Example #1
0
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        static void Main()
        {
            // Create adapter and place a request
            Target target = new Adapter();

            target.Request();
        }
Example #2
0
 static void Main(string[] args)
 {
     Target target = new Adapter();
     target.Request();
     
     Console.ReadKey();
 }
Example #3
0
        static void Main(string[] args)
        {
            Target adapter = new Adapter();

            adapter.Request();
            Console.ReadKey();
        }
Example #4
0
        static void Main()
        {
            Target
                target = new Adapter();

            target.Request();
        }
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        static void Main()
        {
            // Create adapter and place a request
            Target target = new Adapter();
            target.Request();

            // Wait for user
            Console.ReadKey();
        }
Example #6
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));
        }
Example #7
0
        static void Main()
        {
            // Create adapter and call a request
            Target target = new Target();

            target.Request();

            // add Adapter and call SpecificRequest
            target = new Adapter();
            target.Request();

            // Wait for user
            Console.ReadKey();
        }
Example #8
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));
        }
Example #9
0
        static void Main(string[] args)
        {
            #region 基本用法(Basic.cs)
            Target target = new Adapter();
            target.Request();
            #endregion

            #region 具体实例(Example.cs)
            Player b = new Forwards("巴蒂尔");
            b.Attack();

            Player m = new Guards("麦克格雷迪");
            m.Attack();

            //Player ym = new Center("姚明");
            Player ym = new Translator("姚明");
            ym.Attack();
            ym.Defense();

            Console.Read();
            #endregion
        }
Example #10
0
        static void Main(string[] args)
        {
            #region 基本用法(Basic.cs)
            Target target = new Adapter();
            target.Request();
            #endregion

            #region 具体实例(Example.cs)
            Player b = new Forwards("巴蒂尔");
            b.Attack();

            Player m = new Guards("麦克格雷迪");
            m.Attack();

            //Player ym = new Center("姚明");
            Player ym = new Translator("姚明");
            ym.Attack();
            ym.Defense();

            Console.Read();
            #endregion
        }
        static void Main(string[] args)
        {
            Player playerA = new Forwards("Jordan");

            playerA.Attack();
            Player playerB = new Guards("Iverson");

            playerB.Attack();

            Player ym = new Translator("姚明");

            ym.Attack();
            ym.Defense();

            Console.WriteLine("\n");

            Target target = new Adapter();

            target.Request();

            Console.ReadLine();
        }
Example #12
0
 static void Main(string[] args)
 {
     Target adapter = new Adapter();
     adapter.Request();
     Console.ReadKey();
 }
Example #13
0
		static void Main(string[] args) {
			ITarget target = new Adapter(new Adaptee());
			target.Request();

			Console.ReadLine();
		}