Exemple #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Press Any Key to Start");
            Console.ReadLine();

            // Create Client
            ChannelFactory <IFibonacci> channelFactory = new ChannelFactory <IFibonacci>("");
            IFibonacci fibonacci = channelFactory.CreateChannel();

            GenerateCSCodeForService(
                new EndpointAddress("http://localhost:8000/Fibonacci/mex/"),
                System.Environment.CurrentDirectory + "\\..\\..\\GeneratedContract.cs"
                );

            GenerateVBCodeForService(
                new EndpointAddress("http://localhost:8000/Fibonacci/mex/"),
                System.Environment.CurrentDirectory + "\\..\\..\\GeneratedContract.vb"
                );

            // Input Loop
            int input;

            Console.Write("Fibonacci Number: ");
            while (int.TryParse(Console.ReadLine(), out input))
            {
                Console.WriteLine(fibonacci.Compute(input));
                Console.Write("Fibonacci Number: ");
            }

            // Cleanup
            channelFactory.Close();
        }
Exemple #2
0
 public uint Formula() => formula.Compute(n);
Exemple #3
0
 public uint FastDoubling() => fastDoubling.Compute(n);
Exemple #4
0
 public uint Quickly() => quickly.Compute(n);
Exemple #5
0
 public uint Recursive() => recursive.Compute(n);