Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Service2Client wcfTest = new Service2Client();

            Label1.Text = wcfTest.DoWork();
            wcfTest.Close();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Service1Client proxy1 = new Service1Client();
            IService2      proxy2 = new Service2Client();

            Console.WriteLine(proxy1.GetData(10));
            Console.WriteLine(proxy2.DoWork("Nilesh"));

            Console.ReadLine();
        }
Exemple #3
0
 private void button3_Click(object sender, EventArgs e)
 {
     System.ServiceModel.InstanceContext instanceContext = new System.ServiceModel.InstanceContext(new CalculatorCallback());
     var sc = new Service2Client(instanceContext);
     sc.DoWork();
 }