Beispiel #1
0
        /// <summary>
        /// The Carrier Lookup API allows you to retrieve additional information about a phone number. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="phoneNumber">Phone number to do a lookup for.</param>
        /// <returns>Returns carrier lookup</returns>
        public CarrierLookup CarrierLookup(string phoneNumber)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.CarrierLookup(accountSid, phoneNumber));
        }
Beispiel #2
0
        /// <summary>
        /// Shows info on all carrier lookups associated with some account. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="page">Used to return a particular page within the list.</param>
        /// <param name="pageSize">Used to specify the amount of list items to return per page.</param>
        /// <returns>Returns carrier lookup list</returns>
        public CarrierLookupsList CarrierLookupList(int?page = null, int?pageSize = null)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.CarrierLookupList(accountSid, page, pageSize));
        }
Beispiel #3
0
        protected IndexerBase(HttpProvider httpProvider, ConfigProvider configProvider)
        {
            _httpProvider = httpProvider;
            _configProvider = configProvider;

            _logger = LogManager.GetLogger(GetType().ToString());
        }
        /// <summary>
        /// Lists IP addresses attached to some IP access control list. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="aclSid">IP access control list SID.</param>
        /// <returns>Returns list of access control list IPs</returns>
        public IpAddressesList ListAccessControlListIps(string aclSid)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.ListAccessControlListIps(accountSid, aclSid));
        }
        public bool MoveNext()
        {
            string url = NextLink;

            if (String.IsNullOrEmpty(url) && Current == null)
            {
                url = EntityEndpoint;
                if (!url.Contains("$top="))
                {
                    url += url.Contains("?") ? "&" : "?";
                    url += "$top=" + PageSize;
                }
            }
            else if (String.IsNullOrEmpty(NextLink) && Current != null)
            {
                return(false);
            }
            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url);
            var    response            = HttpProvider.SendAsync(request).Result;
            string responseContent     = response.Content.ReadAsStringAsync().Result;
            PaginatedResult <T> result = HttpProvider.Serializer.DeserializeObject <PaginatedResult <T> >(responseContent);

            NextLink = result.NextLink;
            Current  = result.Value;

            return(true);
        }
Beispiel #6
0
        public void DownloadString_should_be_able_to_dowload_text_file()
        {
            var jquery = new HttpProvider().DownloadString("http://www.google.com/robots.txt");

            jquery.Should().NotBeBlank();
            jquery.Should().Contain("Sitemap");
        }
        /// <summary>
        /// View information on access control list IP address. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="aclSid">IP access control list SID.</param>
        /// <param name="ipSid">Access control list IP address SID.</param>
        /// <returns>Returns access control list IP address</returns>
        public IpAddress ViewAccessControlListIp(string aclSid, string ipSid)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.ViewAccessControlListIp(accountSid, aclSid, ipSid));
        }
Beispiel #8
0
 public BannerProvider(HttpProvider httpProvider, EnvironmentProvider environmentProvider,
                         DiskProvider diskProvider)
 {
     _httpProvider = httpProvider;
     _environmentProvider = environmentProvider;
     _diskProvider = diskProvider;
 }
        /// <summary>
        /// Deletes IP access control list
        /// </summary>
        /// <param name="ipAccessControlListSid">IP access control list SID.</param>
        /// <returns>Returns deleted IP  access control list</returns>
        public IpAccessControlList DeleteIpAccessControlList(string ipAccessControlListSid)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.DeleteIpAccessControlList(accountSid, ipAccessControlListSid));
        }
        /// <summary>
        /// Updates information for IP access control list. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="ipAccessControlListSid">IP access control list SID.</param>
        /// <param name="friendlyName">A human-readable name associated with this domain.</param>
        /// <returns>Returns updated IP access control list</returns>
        public IpAccessControlList UpdateIpAccessControlList(string ipAccessControlListSid, string friendlyName)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.UpdateIpAccessControlList(accountSid, ipAccessControlListSid, friendlyName));
        }
        public void InitAuthenticatedClient()
        {
            if (App.GraphClient == null)
            {
                try
                {
                    HttpProvider provider = null;
                    if (App.USE_DEBUG_PROXY_SERVER)
                    {
                        HttpClientHandler handler = new HttpClientHandler
                        {
                            Proxy = new CustomWebProxy(new Uri("http://10.82.124.20:8888"))
                        };
                        provider = new HttpProvider(handler, true);
                    }

                    App.GraphClient = new GraphServiceClient(Constants.GRAPH_BASE_URI, new DelegateAuthenticationProvider(
                                                                 async(requestMessage) => {
                        var token = await GetTokenForUserAsync();
                        requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
                    }), provider);
                }
                catch (Exception ex)
                {
                    Debug.WriteLine("Could not create a graph client: " + ex.Message);
                }
            }
        }
 public MonitoringProvider(ProcessProvider processProvider, IISProvider iisProvider,
                           HttpProvider httpProvider, ConfigFileProvider configFileProvider)
 {
     _processProvider = processProvider;
     _iisProvider = iisProvider;
     _httpProvider = httpProvider;
     _configFileProvider = configFileProvider;
 }
Beispiel #13
0
 public BlackholeProvider(ConfigProvider configProvider, HttpProvider httpProvider,
                          DiskProvider diskProvider, UpgradeHistorySpecification upgradeHistorySpecification)
 {
     _configProvider = configProvider;
     _httpProvider   = httpProvider;
     _diskProvider   = diskProvider;
     _upgradeHistorySpecification = upgradeHistorySpecification;
 }
Beispiel #14
0
 public MonitoringProvider(ProcessProvider processProvider, IISProvider iisProvider,
                           HttpProvider httpProvider, ConfigFileProvider configFileProvider)
 {
     _processProvider    = processProvider;
     _iisProvider        = iisProvider;
     _httpProvider       = httpProvider;
     _configFileProvider = configFileProvider;
 }
        public void Can_Get_Https()
        {
            var url          = "https://jsonplaceholder.typicode.com/comments";
            var httpProvider = new HttpProvider();
            var result       = httpProvider.Get(url, new Dictionary <string, string>());

            Assert.AreEqual(200, result.Value <int>("StatusCode"));
        }
        public void Can_Get_Http()
        {
            var url          = "http://ip.jsontest.com/";
            var httpProvider = new HttpProvider();
            var result       = httpProvider.Get(url, new Dictionary <string, string>());

            Assert.AreEqual(200, result.Value <int>("StatusCode"));
        }
Beispiel #17
0
        /// <summary>
        /// Sends SMS message. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="to">Must be an SMS capable number. The value does not have to be in any specific format.</param>
        /// <param name="body">Text of the SMS to be sent.</param>
        /// <param name="from">Must be a Avaya CPaaS number associated with your account. The value does not have to be in any specific format.</param>
        /// <param name="statusCallback">The URL that will be sent information about the SMS.Url length is limited to 200 characters.</param>
        /// <param name="statusCallbackMethod">The HTTP method used to request the StatusCallback. Valid parameters are GET and POST.</param>
        /// <param name="allowMultiple">If the Body length is greater than 160 characters, the SMS will be sent as a multi-part SMS. Allowed values are True or False.</param>
        /// <returns>Returns created sms message</returns>
        public SmsMessage SendSms(string to, string body, string from = null,
                                  string statusCallback = null, HttpMethod statusCallbackMethod = HttpMethod.POST, bool allowMultiple = false)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.SendSms(accountSid, to, body, from, statusCallback, statusCallbackMethod, allowMultiple));
        }
Beispiel #18
0
        public void GetTxBlock()
        {
            HttpProvider client  = new HttpProvider("https://api.zilliqa.com/");
            TxBlock      txBlock = client.GetTxBlock("40").Result;

            Assert.IsNotNull(txBlock);
            Assert.AreEqual(3, txBlock.Body.MicroBlockInfos.Count());
        }
Beispiel #19
0
        private static async Task <string> GetQueryWiql(string queryId)
        {
            string data = await HttpProvider.GetHttpRequest(StaticParams.TfsUrl, "Enterprise/_apis/wit/queries/" + queryId + "?api-version=2.2&$expand=all");

            QueryDefinitionRequest queryData = JsonConvert.DeserializeObject <QueryDefinitionRequest>(data);

            return(queryData.wiql);
        }
Beispiel #20
0
        /// <summary>
        /// Sends MMS message. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="to">Must be an MMS capable number. The value does not have to be in any specific format.</param>
        /// <param name="body">Text of the MMS to be sent.</param>
        /// <param name="from">Must be a Avaya CPaaS number associated with your account. The value does not have to be in any specific format.</param>
        /// <param name="statusCallback">The URL that will be sent information about the MMS.Url length is limited to 200 characters.</param>
        /// <param name="mediaUrl">URL of an image to be sent in the message.</param>
        /// <returns>Returns created mms message</returns>
        public MmsMessage SendMms(string to, string mediaUrl, string body = null, string from = null,
                                  string statusCallback = null)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.SendMms(accountSid, to, mediaUrl, body, from, statusCallback));
        }
Beispiel #21
0
        public void GetDsBlock()
        {
            HttpProvider client  = new HttpProvider("https://api.zilliqa.com/");
            DsBlock      dsBlock = client.GetDsBlock("1").Result;

            Assert.IsNotNull(dsBlock);
            Assert.IsTrue(dsBlock.Header.Difficulty == 3);
        }
 public BannerDownloadJob(SeriesProvider seriesProvider, HttpProvider httpProvider, DiskProvider diskProvider,
     EnviromentProvider enviromentProvider)
 {
     _seriesProvider = seriesProvider;
     _httpProvider = httpProvider;
     _diskProvider = diskProvider;
     _enviromentProvider = enviromentProvider;
 }
Beispiel #23
0
        /// <summary>
        /// Shows info on all incoming numbers associated with some account. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="contains">List numbers containing certain digits.</param>
        /// <param name="friendlyName">Specifies that only IncomingPhoneNumber resources matching the input FriendlyName should be returned in the list request.</param>
        /// <param name="page">Used to return a particular page within the list.</param>
        /// <param name="pageSize">Used to specify the amount of list items to return per page.</param>
        /// <returns>Returns incoming phone number list</returns>
        public IncomingPhoneNumbersList ListIncomingNumbers(string contains = null, string friendlyName = null,
                                                            int?page        = null, int?pageSize = null)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.ListIncomingNumbers(accountSid, contains, friendlyName, page, pageSize));
        }
        /// <summary>
        /// Restricts outbound calls and sms messages to some destination. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="countryCode">Country code.</param>
        /// <param name="mobileEnabled">Mobile status for the destination. If false, all mobile call activity will be rejected or disabled. Allowed values are "true" and "false".</param>
        /// <param name="landlineEnabled">Landline status for the destination. If false, all landline call activity will be rejected or disabled. Allowed values are "true" and "false".</param>
        /// <param name="smsEnabled">SMS status for the destination. If false, all SMS activity will be rejected or disabled. Allowed values are "true" and "false".</param>
        /// <returns>Returns fraud control rule</returns>
        public FraudControlRule BlockDestination(string countryCode, bool mobileEnabled = true,
                                                 bool landlineEnabled = true, bool smsEnabled = true)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.BlockDestination(accountSid, countryCode, mobileEnabled, landlineEnabled, smsEnabled));
        }
Beispiel #25
0
        public EForecast GetForecast(string sProviderId, string sCityId)
        {
            string       url     = GetRequestUrl(sProviderId, sCityId);
            HttpProvider http    = new HttpProvider(url);
            string       sResult = http.GetResponse();

            return(ForecastProviderFactory.ConvertToForecastData(sProviderId, sResult));
        }
        /// <summary>
        /// Complete list of all usages of your account. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="day">Filters usage by day of month. If no month is specified then defaults to current month. Allowed values are integers between 1 and 31 depending on the month. Leading 0s will be ignored.</param>
        /// <param name="month">Filters usage by month. Allowed values are integers between 1 and 12. Leading 0s will be ignored.</param>
        /// <param name="year">Filters usage by year. Allowed values are valid years in integer form such as "2014".</param>
        /// <param name="product">Filters usage by a specific “product” of Avaya Cloud. Each product is uniquely identified by an integer. For example: Product=1, would return all outbound call usage. The integer assigned to each product is listed below.</param>
        /// <param name="page">Used to return a particular page within the list.</param>
        /// <param name="pageSize">Used to specify the amount of list items to return per page.</param>
        /// <returns>Returns usage list</returns>
        public UsagesList ListUsages(int?day         = null, int?month = null, int?year     = null,
                                     Product?product = null, int?page  = null, int?pageSize = null)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.ListUsages(accountSid, day, month, year, product, page, pageSize));
        }
        public async Task <dynamic> GetColumnType(string fieldName)
        {
            string columnType = await HttpProvider.GetHttpRequest(StaticParams.TfsUrl, "_apis/wit/fields/" + fieldName + "?api-version=1.0");

            dynamic typequery = JObject.Parse(columnType);

            return(typequery);
        }
Beispiel #28
0
        /// <summary>
        /// Options include filtering by muted or deaf. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="conferenceSid">Conference SID.</param>
        /// <param name="muted">Filter by participants that are muted. Allowed values are "true" or "false".</param>
        /// <param name="deaf">Filter by participants that are deaf. Allowed values are "true" or "false".</param>
        /// <param name="page">Used to return a particular page within the list.</param>
        /// <param name="pageSize">Used to specify the amount of list items to return per page.</param>
        /// <returns>Returns participant list</returns>
        public ParticipantsList ListParticipants(string conferenceSid,
                                                 bool muted = false, bool deaf = false, int?page = null, int?pageSize = null)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.ListParticipants(accountSid, conferenceSid, muted, deaf, page, pageSize));
        }
 public UpdateProvider(HttpProvider httpProvider, ConfigProvider configProvider,
                       EnvironmentProvider environmentProvider, DiskProvider diskProvider)
 {
     _httpProvider        = httpProvider;
     _configProvider      = configProvider;
     _environmentProvider = environmentProvider;
     _diskProvider        = diskProvider;
 }
Beispiel #30
0
 public void Setup()
 {
     this.testHttpMessageHandler = new TestHttpMessageHandler();
     this.httpClient             = new HttpClient(this.testHttpMessageHandler, /* disposeHandler */ true);
     this.httpProvider           = new HttpProvider(this.serializer.Object);
     this.httpProvider.httpClient.Dispose();
     this.httpProvider.httpClient = this.httpClient;
 }
Beispiel #31
0
        /// <summary>
        /// Sets participant in conference to mute or deaf. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="conferenceSid">Conference SID.</param>
        /// <param name="participantSid">Participant SID.</param>
        /// <param name="muted">Specifies whether the participant should be muted. Allowed values are "true" and "false".</param>
        /// <param name="deaf">Specifies whether the participant should be deaf. Allowed values are "true" and "false".</param>
        /// <returns>Returns participant</returns>
        public Participant MuteOrDeafParticipant(string conferenceSid, string participantSid,
                                                 bool muted = false, bool deaf = false)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.MuteOrDeafParticipant(accountSid, conferenceSid, participantSid, muted, deaf));
        }
Beispiel #32
0
 public UpdateProvider(HttpProvider httpProvider, ConfigProvider configProvider,
     EnvironmentProvider environmentProvider, DiskProvider diskProvider)
 {
     _httpProvider = httpProvider;
     _configProvider = configProvider;
     _environmentProvider = environmentProvider;
     _diskProvider = diskProvider;
 }
        /// <summary>
        /// Shows info on all recordings associated with some account. Uses {accountSid} from configuration in HttpProvider
        /// </summary>
        /// <param name="callSid">Filters by recordings associated with a given CallSid.</param>
        /// <param name="dateCreatedGte">Filter by date created greater or equal than.</param>
        /// <param name="dateCreatedLt">Filter by date created less than.</param>
        /// <param name="page">Used to return a particular page within the list.</param>
        /// <param name="pageSize">Used to specify the amount of list items to return per page.</param>
        /// <returns>Returns recording list</returns>
        public RecordingsList ListRecordings(string callSid         = null, DateTime dateCreatedGte = default(DateTime),
                                             DateTime dateCreatedLt = default(DateTime), int?page   = null, int?pageSize = null)
        {
            // Get account sid from configuration
            var accountSid = HttpProvider.GetConfiguration().AccountSid;

            return(this.ListRecordings(accountSid, callSid, dateCreatedGte, dateCreatedLt, page, pageSize));
        }
Beispiel #34
0
        public IEnumerable <FilmeVO> ObterFilmes()
        {
            IEnumerable <FilmeVO> filmes = null;

            using (var chamada = new HttpProvider("https://copadosfilmes.azurewebsites.net/").GetAsync <IEnumerable <FilmeVO> >("api/filmes", null))
                filmes = chamada.Result;
            return(filmes);
        }
        public string SendDataServerCentral(WinOSInfo winos)
        {
            var client = new HttpProvider(_urlServer);
            var result = client.SendPostJson <WinOSInfo>(_urlEndPoint, winos).Result;

            Console.WriteLine("Status {0} Hour {1} ", result, DateTimeOffset.UtcNow);
            return(result);
        }
Beispiel #36
0
        //[Test]
        public async void AuthorizationTest()
        {
            var httpProvider = new HttpProvider();

            var provider = await httpProvider.AuthorizeAsync(LoginUrl, Login, Pass);

            Assert.True(provider.IsAuthorized);
        }
 public void Setup()
 {
     this.httpResponseMessage = new HttpResponseMessage();
     this.httpMessageHandler = new TestHttpMessageHandler(this.httpResponseMessage);
     this.httpClient = new HttpClient(this.httpMessageHandler);
     this.httpProvider = new HttpProvider(this.serializer.Object);
     this.httpProvider.httpClient = this.httpClient;
 }
 public void Setup()
 {
     this.testHttpMessageHandler = new TestHttpMessageHandler();
     this.httpClient = new HttpClient(this.testHttpMessageHandler, /* disposeHandler */ true);
     this.httpProvider = new HttpProvider(this.serializer.Object);
     this.httpProvider.httpClient.Dispose();
     this.httpProvider.httpClient = this.httpClient;
 }
        public void HttpProvider_DefaultConstructor()
        {
            using (var defaultHttpProvider = new HttpProvider())
            {
                Assert.IsTrue(defaultHttpProvider.httpClient.DefaultRequestHeaders.CacheControl.NoCache, "NoCache false.");
                Assert.IsTrue(defaultHttpProvider.httpClient.DefaultRequestHeaders.CacheControl.NoStore, "NoStore false.");

                Assert.IsInstanceOfType(defaultHttpProvider.Serializer, typeof(Serializer), "Unexpected serializer initilaized.");
            }
        }
Beispiel #40
0
 public AppUpdateJob(UpdateProvider updateProvider, EnvironmentProvider environmentProvider, DiskProvider diskProvider,
     HttpProvider httpProvider, ProcessProvider processProvider, ArchiveProvider archiveProvider, ConfigFileProvider configFileProvider)
 {
     _updateProvider = updateProvider;
     _environmentProvider = environmentProvider;
     _diskProvider = diskProvider;
     _httpProvider = httpProvider;
     _processProvider = processProvider;
     _archiveProvider = archiveProvider;
     _configFileProvider = configFileProvider;
 }
        public void HttpProvider_DefaultConstructor()
        {
            using (var defaultHttpProvider = new HttpProvider())
            {
                Assert.IsTrue(defaultHttpProvider.httpClient.DefaultRequestHeaders.CacheControl.NoCache, "NoCache false.");
                Assert.IsTrue(defaultHttpProvider.httpClient.DefaultRequestHeaders.CacheControl.NoStore, "NoStore false.");

                Assert.AreEqual(TimeSpan.FromSeconds(100), defaultHttpProvider.httpClient.Timeout, "Unexpected default timeout set.");

                Assert.IsInstanceOfType(defaultHttpProvider.Serializer, typeof(Serializer), "Unexpected serializer initialized.");
            }
        }
        public void HttpProvider_CustomCacheHeaderAndTimeout()
        {
            var timeout = TimeSpan.FromSeconds(200);
            var cacheHeader = new CacheControlHeaderValue();
            using (var defaultHttpProvider = new HttpProvider(null) { CacheControlHeader = cacheHeader, OverallTimeout = timeout })
            {
                Assert.IsFalse(defaultHttpProvider.httpClient.DefaultRequestHeaders.CacheControl.NoCache, "NoCache true.");
                Assert.IsFalse(defaultHttpProvider.httpClient.DefaultRequestHeaders.CacheControl.NoStore, "NoStore true.");

                Assert.AreEqual(timeout, defaultHttpProvider.httpClient.Timeout, "Unexpected default timeout set.");
                Assert.IsNotNull(defaultHttpProvider.Serializer, "Serializer not initialized.");
                Assert.IsInstanceOfType(defaultHttpProvider.Serializer, typeof(Serializer), "Unexpected serializer initialized.");
            }
        }
        public async Task<bool> Claim(Uri uri, string documentTitle)
        {
            var authenticationResponseValues = UrlHelper.GetQueryOptions(uri);
            OAuthErrorHandler.ThrowIfError(authenticationResponseValues);

            string code;
            if (authenticationResponseValues != null && authenticationResponseValues.TryGetValue("code", out code))
            {
                using (var httpProvider = new HttpProvider())
                {
                    _accountSession =
                        await
                            _oAuthHelper.RedeemAuthorizationCodeAsync(code, OneDriveHelper.OneDriveClientId,
                                OneDriveHelper.OneDriveClientSecret, this.RedirectionUrl.ToString(), OneDriveHelper.Scopes,
                                httpProvider).ConfigureAwait(false);
                }
            }

            return (_accountSession != null);
        }
 internal virtual Stream CallSession()
 {
     IDictionary parameters = new Dictionary<string, string>();
     if (this.info.User != null)
     {
         parameters["LS_user"] = this.info.User;
     }
     if (this.info.Password != null)
     {
         parameters["LS_password"] = this.info.Password;
     }
     parameters["LS_adapter_set"] = this.info.GetAdapterSet();
     if (!(this.info.Polling || !this.info.useGetForStreaming))
     {
         AddConnectionPropertiesForFakePolling(parameters, this.info);
     }
     else
     {
         AddConnectionProperties(parameters, this.info);
     }
     AddConstraints(parameters, this.info.Constraints);
     HttpProvider provider = new HttpProvider(this.info.PushServerUrl + "/lightstreamer/create_session.txt", this.cookies);
     protLogger.Info("Opening stream connection");
     if (protLogger.IsDebugEnabled)
     {
         protLogger.Debug("Connection params: " + CollectionsSupport.ToString(parameters));
     }
     parameters["LS_silverlightWP_version"] = Constants.localVersion;
     return provider.DoHTTP(parameters, true);
 }
 internal virtual Stream CallResync(PushServerProxy.PushServerProxyInfo pushInfo, Lightstreamer.DotNet.Client.ConnectionConstraints newConstraints)
 {
     IDictionary parameters = new Dictionary<string, string>();
     parameters["LS_session"] = pushInfo.sessionId;
     if (newConstraints != null)
     {
         this.info.Constraints = (Lightstreamer.DotNet.Client.ConnectionConstraints) newConstraints.Clone();
     }
     AddConnectionProperties(parameters, this.info);
     AddConstraints(parameters, this.info.Constraints);
     HttpProvider provider = new HttpProvider(pushInfo.rebindAddress + "/lightstreamer/bind_session.txt", this.cookies);
     protLogger.Info("Opening stream connection to rebind current session");
     if (protLogger.IsDebugEnabled)
     {
         protLogger.Debug("Rebinding params: " + CollectionsSupport.ToString(parameters));
     }
     parameters["LS_silverlightWP_version"] = Constants.localVersion;
     bool useGet = !this.info.Polling && this.info.useGetForStreaming;
     return provider.DoHTTP(parameters, !useGet);
 }
 internal virtual Stream CallResync(PushServerProxy.PushServerProxyInfo pushInfo, Lightstreamer.DotNet.Client.ConnectionConstraints newConstraints)
 {
     Hashtable parameters = new Hashtable();
     parameters["LS_session"] = pushInfo.sessionId;
     if (newConstraints != null)
     {
         this.info.constraints = (Lightstreamer.DotNet.Client.ConnectionConstraints) newConstraints.Clone();
     }
     AddConnectionProperties(parameters, this.info);
     AddConstraints(parameters, this.info.constraints);
     HttpProvider provider = new HttpProvider(pushInfo.rebindAddress + "/lightstreamer/bind_session.txt");
     protLogger.Info("Opening stream connection to rebind current session");
     if (protLogger.IsDebugEnabled)
     {
         protLogger.Debug("Rebinding params: " + CollectionsSupport.ToString(parameters));
     }
     return provider.DoPost(parameters);
 }
Beispiel #47
0
 public TvRageProvider(HttpProvider httpProvider)
 {
     _httpProvider = httpProvider;
 }
Beispiel #48
0
 public XbmcProvider(ConfigProvider configProvider, HttpProvider httpProvider, EventClientProvider eventClientProvider)
 {
     _configProvider = configProvider;
     _httpProvider = httpProvider;
     _eventClientProvider = eventClientProvider;
 }
 internal virtual Stream CallSession()
 {
     Stream stream;
     Hashtable parameters = new Hashtable();
     if (this.info.user != null)
     {
         parameters["LS_user"] = this.info.user;
     }
     if (this.info.password != null)
     {
         parameters["LS_password"] = this.info.password;
     }
     if (this.info.adapter != null)
     {
         parameters["LS_adapter"] = this.info.adapter;
     }
     AddConnectionProperties(parameters, this.info);
     AddConstraints(parameters, this.info.constraints);
     HttpProvider provider = new HttpProvider(this.info.pushServerUrl + "/lightstreamer/create_session.txt");
     protLogger.Info("Opening stream connection");
     if (protLogger.IsDebugEnabled)
     {
         protLogger.Debug("Connection params: " + CollectionsSupport.ToString(parameters));
     }
     try
     {
         stream = provider.DoPost(parameters);
     }
     catch (UriFormatException exception)
     {
         throw exception;
     }
     catch (WebException exception2)
     {
         throw exception2;
     }
     return stream;
 }
Beispiel #50
0
 public DefaultEnabledIndexer(HttpProvider httpProvider, ConfigProvider configProvider)
     : base(httpProvider, configProvider)
 {
 }
Beispiel #51
0
 public SearchProvider(HttpProvider httpProvider)
 {
     _httpProvider = httpProvider;
 }
Beispiel #52
0
 public CustomParserIndexer(HttpProvider httpProvider, ConfigProvider configProvider)
     : base(httpProvider, configProvider)
 {
 }
Beispiel #53
0
 public NotConfiguredIndexer(HttpProvider httpProvider, ConfigProvider configProvider)
     : base(httpProvider, configProvider)
 {
 }
Beispiel #54
0
 public TestUrlIndexer(HttpProvider httpProvider, ConfigProvider configProvider)
     : base(httpProvider, configProvider)
 {
 }
 public SceneMappingProvider(IDatabase database, HttpProvider httpProvider, ConfigProvider configProvider)
 {
     _database = database;
     _httpProvider = httpProvider;
     _configProvider = configProvider;
 }
 public ReferenceDataProvider(IDatabase database, HttpProvider httpProvider, ConfigProvider configProvider)
 {
     _database = database;
     _httpProvider = httpProvider;
     _configProvider = configProvider;
 }
Beispiel #57
0
 public RateProvider(HttpProvider httpProvider)
 {
     _httpProvider = httpProvider;
 }
Beispiel #58
0
 public MockIndexer(HttpProvider httpProvider, ConfigProvider configProvider)
     : base(httpProvider, configProvider)
 {
 }
 public RecommendationsProvider(HttpProvider httpProvider)
 {
     _httpProvider = httpProvider;
 }
Beispiel #60
0
 public NzbgetProvider(ConfigProvider configProvider, HttpProvider httpProvider)
 {
     _configProvider = configProvider;
     _httpProvider = httpProvider;
 }