protected GetSessionResponseModel Get_Session_Implementation() { string useragent = HttpContext.Current.Request.UserAgent; HttpBrowserCapabilities browser = new HttpBrowserCapabilities { Capabilities = new Hashtable { { string.Empty, useragent } } }; BrowserCapabilitiesFactory factory = new BrowserCapabilitiesFactory(); factory.ConfigureBrowserCapabilities(new NameValueCollection(), browser); GetSessionRequestModel request = new GetSessionRequestModel() { Type = 1, Connection = new JsonConnection() { IP = Config.IP, Port = Config.Port }, Browser = new JsonBrowser() { Name = browser.Browser, Version = browser.Version } }; HttpPostAgent <GetSessionRequestModel, GetSessionResponseModel> agent = new HttpPostAgent <GetSessionRequestModel, GetSessionResponseModel>(); agent.Url = Config.Get_Session; agent.Body = request; return(agent.Send()); }
protected GetBusLocationsResponseModel Get_Bus_Locations_Implementation(GetBusLocationsRequestModel request) { HttpPostAgent <GetBusLocationsRequestModel, GetBusLocationsResponseModel> agent = new HttpPostAgent <GetBusLocationsRequestModel, GetBusLocationsResponseModel>(); agent.Url = Config.Get_Bus_Locations; agent.Body = request; return(agent.Send()); }