Example #1
0
 //private void GetFollower(string statusid)
 //{
 //    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.GetFollowerCompleted += client_GetFollowerCompleted;
 //    svc.GetFollowerAsync(statusid, "xml", ConfigurationSettings.TokenKey, ConfigurationSettings.TokenKeySecret);
 //}
 //private void client_GetFollowerCompleted(object sender, GetFollowerCompletedEventArgs e)
 //{
 //}
 private void GetDirectMessage()
 {
     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.GetDirectMessagesCompleted += client_GetDirectMessageCompleted;
     svc.GetDirectMessagesAsync("xml", ConfigurationSettings.TokenKey, ConfigurationSettings.TokenKeySecret);
 }
Example #2
0
        //private void GetFollower(string statusid)
        //{
        //    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.GetFollowerCompleted += client_GetFollowerCompleted;
        //    svc.GetFollowerAsync(statusid, "xml", ConfigurationSettings.TokenKey, ConfigurationSettings.TokenKeySecret);
        //}

        //private void client_GetFollowerCompleted(object sender, GetFollowerCompletedEventArgs e)
        //{

        //}

        private void GetDirectMessage()
        {
            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.GetDirectMessagesCompleted += client_GetDirectMessageCompleted;
            svc.GetDirectMessagesAsync("xml", ConfigurationSettings.TokenKey, ConfigurationSettings.TokenKeySecret);
        }