public void CleanUp() { Console.WriteLine("CleanUp"); // delete the shop if it still/already exists TShopRef shopRef = new TShopRef(); shopRef.Alias = ALIAS; if (shopConfigService.exists(shopRef)) { shopConfigService.deleteShopRef(shopRef); } }
private void deleteIfExists(string alias) { ShopConfigService shopConfigService = new ShopConfigService(); shopConfigService.Credentials = new System.Net.NetworkCredential(WEBSERVICE_LOGIN, WEBSERVICE_PASSWORD); shopConfigService.PreAuthenticate = true; shopConfigService.Url = WEBSERVICE_URL; EpagesProviderWebServices.ShopConfigService6Ref.TShopRef shopRef = new EpagesProviderWebServices.ShopConfigService6Ref.TShopRef(); shopRef.Alias = ALIAS; if (shopConfigService.exists(shopRef)) { shopConfigService.deleteShopRef(shopRef); } shopRef.Alias = NEW_ALIAS; if (shopConfigService.exists(shopRef)) { shopConfigService.deleteShopRef(shopRef); } }