コード例 #1
0
        protected void CallA_Click(object sender, EventArgs e)
        {
            ServiceAClient client = null;

            try
            {
                client          = new ServiceAClient();
                LiteralWeb.Text = "A:" + client.GetSomething();
            }
            finally
            {
                client.Close();
            }
        }
コード例 #2
0
        public string PassSomethingToA()
        {
            ServiceAClient client = null;

            try
            {
                client = new ServiceAClient();
                return(client.GetSomething());
            }
            finally
            {
                client.Close();
            }
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: ChuckTest/WCFTest
 private void InitProxy()
 {
     //传递的参数是endpoint的名字
     proxyA = new ServiceAClient("BasicHttpBinding_IServiceA");
     proxyB = new ServiceBClient("BasicHttpBinding_IServiceB");
 }
コード例 #4
0
 public HomeController(ILogger <HomeController> logger, ServiceAClient serviceAclient)
 {
     this.serviceAclient = serviceAclient;
     _logger             = logger;
 }