private void GetToken(string userID, string passwd) { CustomBinding binding = new CustomBinding(new BinaryMessageEncodingBindingElement(), new HttpTransportBindingElement()); EndpointAddress address = new EndpointAddress(new Uri(Application.Current.Host.Source, "/SinaDesktop.Web/SinaService.svc")); SinaDataService.DataServiceClient svc = new SinaDataService.DataServiceClient(binding, address); svc.GetTokenCompleted += client_GetTokenCompleted; svc.GetTokenAsync(userID, passwd); }
private void GetToken(string userID, string passwd) { CustomBinding binding = new CustomBinding(new BinaryMessageEncodingBindingElement(), new HttpTransportBindingElement()); EndpointAddress address = new EndpointAddress(new Uri(Application.Current.Host.Source, "/SinaDesktop.Web/SinaService.svc")); SinaDataService.DataServiceClient svc = new SinaDataService.DataServiceClient(binding, address); svc.GetTokenCompleted += client_GetTokenCompleted; svc.GetTokenAsync(userID, passwd); }