Beispiel #1
0
        private void UploadHttpWebRequestByoAuth(string username, string passwd, string status, string tokenKey, string tokenSecretKey)
        {
            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.UploadHttpWebRequestByoAuthCompleted += client_UploadHttpWebRequestByoAuthCompleted;
            svc.UploadHttpWebRequestByoAuthAsync(username, passwd, status, tmpImageName, tmpImageStream, tokenKey, tokenSecretKey);
        }
Beispiel #2
0
 private void UploadHttpWebRequestByoAuth(string username, string passwd, string status, string tokenKey, string tokenSecretKey)
 {
     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.UploadHttpWebRequestByoAuthCompleted += client_UploadHttpWebRequestByoAuthCompleted;
     svc.UploadHttpWebRequestByoAuthAsync(username, passwd, status, tmpImageName, tmpImageStream, tokenKey, tokenSecretKey);
 }