Example #1
0
        static void Main(string[] args)
        {
            Method1 createArray = (x) =>
            {
                int[] a = new int[5];
                for (int i = 0; i < a.Length; ++i)
                {
                    a[i] = x * (i + 1);
                }
                return(a);
            };

            Method2 printArray = (x) =>
            {
                foreach (var el in x)
                {
                    Console.Write(el + " ");
                }
                Console.WriteLine();
            };

            var array = createArray(5);

            printArray(array);

            var array2 = createArray(10);

            printArray(array2);
        }
Example #2
0
        static void Main(string[] args)
        {
            Add     add2 = (x, y, z) => x + y / z;
            Method2 mess = () => Method1();

            mess();
            int a    = 5;
            Ref ref1 = (ref int n) => n = n * n;

            ref1(ref a);
            Console.WriteLine(a);
            Hello hello = () => Console.WriteLine("HIII");

            hello();
            Add add = (x, y, z) => x + y * z;

            Console.WriteLine(add(10, 10, 2));
            Console.WriteLine(add(5, 5, 5));
            int[] array   = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
            int   result1 = Sum(array, b => b > 5);
        }
Example #3
0
        static void Main(string[] args)
        {
            var methods = new Menu();

            methods.FirstMethod  = "1";
            methods.SecondMethod = "2";
            methods.ThirdMethod  = "3";
            methods.Leave        = "Leave";
            methods.Choice();

            var method1 = new Method1();

            method1.One();
            var method2 = new Method2();

            method2.Two();
            var method3 = new Method3();

            method3.Three();
            var leave = new Leave();

            leave.Four();
        }
Example #4
0
        public static RestSharp.Method Convert(this Method2 method)
        {
            switch (method)
            {
            case Method2.GET:
                return(RestSharp.Method.GET);

            case Method2.POST:
                return(RestSharp.Method.POST);

            case Method2.PUT:
                return(RestSharp.Method.PUT);

            case Method2.PATCH:
                return(RestSharp.Method.PATCH);

            case Method2.DELETE:
                return(RestSharp.Method.DELETE);

            default:
                return(RestSharp.Method.GET);
            }
        }
 public SecurityController(Method1 _method1, Method2 _method2)
 {
     method1 = _method1;
     method2 = _method2;
 }
 public Commands(Method2 method2)
 {
     this.method2 = method2;
 }
Example #7
0
 public Request(string ressource, Method2 method) : this(method)
 {
     Ressource = ressource;
 }
Example #8
0
 public Request(Method2 method)
 {
     Method = method;
 }