Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using ConsoleAppClient.ServiceReference1;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace WcfServiceClient {
- class Program
- {
- static void Main(string[] args) { //Krok 1: Utworzenie instancji WCF proxy.
- KalkulatorClient mojKlient = new KalkulatorClient(); // Krok 2: Wywolanie operacji uslugi.
- // Operacja Dodaj: ...
- double result = mojKlient.Dodaj(22, 2);
- Console.WriteLine("Uruchamiam Dodaj..." + result);
- result = mojKlient.Odejmij(22, 2);
- Console.WriteLine("Uruchamiam Odejmij..." + result);
- result = mojKlient.Pomnoz(22, 2);
- Console.WriteLine("Uruchamiam Pomnoz..." + result);
- // Operacja Podziel: ...
- //result = mojKlient.Podziel(22, 2);
- //Console.WriteLine("Uruchamiam Podziel..."); // Krok 3: Zamknięcie klienta zamyka polaczenie i czysci zasoby.
- mojKlient.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement