static void Main()
        {
            ServiceCalculatorClient calculatorClient = new ServiceCalculatorClient();
            int result = calculatorClient.Calculate(3, 5, CalculationOperation.Add);

            System.Console.WriteLine("The result returned by the WCF service is: " + result);
        }
Ejemplo n.º 2
0
        static void Main()
        {
            var client = new ServiceCalculatorClient();

            long result = client.SumNumbers(5, 7);
            Console.WriteLine(result);
        }
Ejemplo n.º 3
0
        static void Main()
        {
            var client = new ServiceCalculatorClient();

            long result = client.SumNumbers(5, 7);

            Console.WriteLine(result);
        }
 protected void ButtonAdd_Click(object sender, EventArgs e)
 {
     ServiceCalculatorClient client = new ServiceCalculatorClient();
     int firstNumber = int.Parse(TextBoxFirstNumber.Text);
     int secondNumber = int.Parse(TextBoxSecondNumber.Text);
     LabelResult.Text = "Result: " + client.Calculate(
         firstNumber, secondNumber, CalculationOperation.Add);
 }
Ejemplo n.º 5
0
    protected void ButtonAdd_Click(object sender, EventArgs e)
    {
        ServiceCalculatorClient client = new ServiceCalculatorClient();
        int firstNumber  = int.Parse(TextBoxFirstNumber.Text);
        int secondNumber = int.Parse(TextBoxSecondNumber.Text);

        LabelResult.Text = "Result: " + client.Calculate(
            firstNumber, secondNumber, CalculationOperation.Add);
    }
        static void Main()
        {
            var client = new ServiceCalculatorClient();

            var startP = new Point { X = 17, Y = 17 };
            var endP = new Point { X = 0, Y = -0 };

            var distance = client.CalculateDistance(startP, endP);
            Console.WriteLine("Distance: {0:F3}", distance);
            
        }
Ejemplo n.º 7
0
        static void Main()
        {
            var client = new ServiceCalculatorClient();

            var startPoint = new Point()
            {
                X = 7, Y = 9
            };
            var endPoint = new Point()
            {
                X = -7, Y = -9
            };
            var distance = client.CalculateDistance(startPoint, endPoint);

            Console.WriteLine("distance = " + distance);
        }
        static void Main()
        {
            var service = new ServiceCalculatorClient();
            var startPoint = new Point()
            {
                X = 10,
                Y = 10
            };
            var endPoint = new Point()
            {
                X = 20,
                Y = 20
            };

            var result = service.CalculateDistance(startPoint, endPoint);
            Console.WriteLine(result);
        }
Ejemplo n.º 9
0
        static void Main()
        {
            Point a = new Point()
            {
                X = 5,
                Y = 11
            };

            Point b = new Point()
            {
                X = 10,
                Y = 12
            };

            using (var client = new ServiceCalculatorClient())
            {
                double result = client.CalcDistance(a, b);
                Console.WriteLine(result);
            }
        }
Ejemplo n.º 10
0
        static void Main()
        {
            Point a = new Point()
            {
                X = 5,
                Y = 11
            };

            Point b = new Point()
            {
                X = 10,
                Y = 12
            };

            using (var client = new ServiceCalculatorClient())
            {
                double result = client.CalcDistance(a, b);
                Console.WriteLine(result);
            }
        }
 public void TestInitialize()
 {
     this.calculatorClient = new ServiceCalculatorClient();
 }
 public void TestInitialize()
 {
     this.calculatorClient = new ServiceCalculatorClient();
 }
 static void Main()
 {
     ServiceCalculatorClient calculatorClient = new ServiceCalculatorClient();
     int result = calculatorClient.Calculate(3, 5, CalculationOperation.Add);
     System.Console.WriteLine("The result returned by the WCF service is: " + result);
 }