public ISkinDefinitionBuilder GetSkinDefinitionBuilder(BrandEntity brand, SkinEntity skin, ABTestCaseDescriptor abTestDescriptor) { var clientBuilder = GetClientUrlBuilder(brand, skin); IPreloaderSetup preloaderSetup = GetPreloaderSetup(brand, skin); var files = CreateFiles(preloaderSetup.GetFileDescriptors(brand, skin), clientBuilder.BuildBaseUrl(abTestDescriptor?.Test), new SkinCode(brand.Id, skin.Id), abTestDescriptor?.Test); return(new SkinDefinitionBuilder(clientBuilder.GetVersion(abTestDescriptor?.Test), CreateParser(files), CreateConverer(files))); }
private ABTestCaseSet[] FindABTestCases(BrandEntity brand, SkinEntity skin, IPreloaderSetup preloaderSetup) { var abTestConfigurationReader = CreateJsonABTestingConfigurationReader(brand, skin, preloaderSetup); var abTestConfiguration = abTestConfigurationReader.Read(brand.CDNUrl); if (abTestConfiguration == null) { return(new ABTestCaseSet[0]); } return(abTestConfiguration.GetApplicableTestCases(new SkinCode(brand.Id, skin.Id))); }
private JsonABTestingConfigurationReader CreateJsonABTestingConfigurationReader(BrandEntity brand, SkinEntity skin, IPreloaderSetup preloaderSetup) { return(new JsonABTestingConfigurationReader(_serviceLocator.GetInstance <IWebClientFactory>(), preloaderSetup.GetNavigationPlanPath(brand, skin))); }
public JsonClientUrlBuilder(PathDescriptor cdnUrl, SkinCode skinCode, string version, IPreloaderSetup preloaderSetup) : base(cdnUrl, skinCode, version) { _preloaderSetup = preloaderSetup; }
public JsonClientUrlBuilderFactory(IWebClientFactory webClientFactory, IPreloaderSetup preloaderSetup) : base(webClientFactory) { _preloaderSetup = preloaderSetup; }