コード例 #1
0
        private void GetEmotions()
        {
            var httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();

            httpBindingElement.MaxBufferSize          = 2147483647;
            httpBindingElement.MaxReceivedMessageSize = 2147483647;


            CustomBinding binding = new CustomBinding(new BinaryMessageEncodingBindingElement(), httpBindingElement);

            EndpointAddress address = new EndpointAddress(new Uri(Application.Current.Host.Source, "/SinaDesktop.Web/SinaService.svc"));

            SinaDataService.DataServiceClient svc = new SinaDataService.DataServiceClient(binding, address);
            svc.GetEmotionsCompleted += client_GetEmotions;
            svc.GetEmotionsAsync("image", "xml", ConfigurationSettings.TokenKey, ConfigurationSettings.TokenKeySecret);
        }
コード例 #2
0
ファイル: Home.xaml.cs プロジェクト: jv9/lightbus
        private void GetEmotions()
        {
            var httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
            httpBindingElement.MaxBufferSize = 2147483647;
            httpBindingElement.MaxReceivedMessageSize = 2147483647;

            CustomBinding binding = new CustomBinding(new BinaryMessageEncodingBindingElement(), httpBindingElement);

            EndpointAddress address = new EndpointAddress(new Uri(Application.Current.Host.Source, "/SinaDesktop.Web/SinaService.svc"));

            SinaDataService.DataServiceClient svc = new SinaDataService.DataServiceClient(binding, address);
            svc.GetEmotionsCompleted += client_GetEmotions;
            svc.GetEmotionsAsync("image", "xml", ConfigurationSettings.TokenKey, ConfigurationSettings.TokenKeySecret);
        }