public GoogleBaseExporter(long subdomainid, string hostname, long? sessionid = null) : this(hostname) { ownerid = sessionid; service = new ContentForShoppingService("tradelr"); var authFactory = new GAuthSubRequestFactory("gbase", "tradelr"); using (var repository = new TradelrRepository()) { var sd = repository.GetSubDomain(subdomainid); if (sd.gbaseid.HasValue && !string.IsNullOrEmpty(sd.googleBase.sessiontoken)) { service.RequestFactory = authFactory; service.SetAuthenticationToken(sd.googleBase.sessiontoken); accountid = sd.googleBase.accountid.ToString(); } else { // use tradelr as default service.setUserCredentials("*****@*****.**", "tuaki1976"); accountid = "8812401"; } // get feed if (sd.gbaseid.HasValue) { var query = new ProductQuery("schema", accountid); feed = service.Query(query); InitLocalisation(sd.gbaseid.HasValue ? sd.googleBase.country : COUNTRY_US, sd.currency.ToCurrency()); } } }