Request() публичный Метод

public Request ( ) : void
Результат void
Пример #1
0
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        static void Main()
        {
            // Create adapter and place a request
            Target target = new Adapter();

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

            adapter.Request();
            Console.ReadKey();
        }
Пример #4
0
        static void Main()
        {
            Target
                target = new Adapter();

            target.Request();
        }
Пример #5
0
        /// <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();
        }
Пример #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));
        }
Пример #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();
        }
Пример #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));
        }
Пример #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
        }
Пример #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
        }
Пример #11
0
        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();
        }
Пример #12
0
 static void Main(string[] args)
 {
     Target adapter = new Adapter();
     adapter.Request();
     Console.ReadKey();
 }
Пример #13
0
		static void Main(string[] args) {
			ITarget target = new Adapter(new Adaptee());
			target.Request();

			Console.ReadLine();
		}