private void ReloadTestCasesAsync(BrandEntity brand, SkinEntity skin) { var newABTestCases = new ABTestCaseSetViewModel[0]; if (brand != null && skin != null) { newABTestCases = ClientInformationProvider.GetABTestCases(brand, skin) .Select(tc => new ABTestCaseSetViewModel(tc)) .ToArray(); } ServiceLocator.GetInstance <IApplicationServices>().ExecuteOnUIThread(() => { UbscribeFromTestsPropertyChanged(TestCaseSets); TestCaseSets = newABTestCases; SubscribeToTestsPropertyChanged(newABTestCases); if (brand != null && skin != null) { this.ShowNoAbTestDetectedMessage = true; } OnPropertyChanged(nameof(IsValid)); }); }
private ISkinDefinitionBuilder GetBuilder() { if (!IsValid) { throw new InvalidOperationException("You must select a brand and skin"); } return(ClientInformationProvider.GetSkinDefinitionBuilder(SelectedBrand, SelectedSkin, GetSelectedABTest())); }