public List <SiteDto> GetTargetSites(string site) { string referralSiteOptions = ""; SiteProfile siteProfile = _dbContext.Set <SiteProfile>().Where(s => s.Site == site && s.Name == Contants.Profile.ReferralSiteOptions).FirstOrDefault(); if (siteProfile == null) { SystemProfile systemProfile = _dbContext.Set <SystemProfile>().Where(s => s.Name == Contants.Profile.ReferralSiteOptions).FirstOrDefault(); referralSiteOptions = systemProfile.Value; } else { referralSiteOptions = siteProfile.Value; } //split List <string> referralSiteOptionList = referralSiteOptions.Split(new string[] { Contants.Profile.ReferralSiteOptionsSplit }, StringSplitOptions.RemoveEmptyEntries).ToList(); if (referralSiteOptionList.Count > 0) { List <SiteDto> sites = _dbContext.Set <Site>().Where(s => referralSiteOptionList.Contains(s.SiteName)).Select(Mapper.Map <Site, SiteDto>).ToList(); return(sites); } return(null); }
public void SaveSiteProperties(ClientContext ctx, SiteProfile profile) { var _customProperties = profile.CustomProperties; ctx.Web.ApplySitePolicy(profile.SitePolicy); CamlQuery _query = new CamlQuery(); var _siteInfoList = ctx.Web.Lists.GetByTitle(SiteClassificationList.SiteClassificationListTitle); ListItemCollection _items = _siteInfoList.GetItems(_query); ctx.Load(_items, eachItem => eachItem.Include( item => item, item => item[SiteClassificationFields.FLD_KEY_INTERNAL_NAME], item => item[SiteClassificationFields.FLD_VALUE_INTERNAL_NAME])); ctx.ExecuteQuery(); if (_items.Count > 0) { foreach (var _item in _items) { this.SetListItemValue(_siteInfoList, _item, _customProperties); } _siteInfoList.Update(); ctx.ExecuteQuery(); } }
public async Task SetSiteProfile(SiteProfile siteProfile) { var entity = _mapper.Map <Entities.PublicSiteProfile>(siteProfile); entity.Id = 0; await _profileRepository.Set(entity); }
private void comboBoxSites_SelectionChanged(object sender, SelectionChangedEventArgs e) { SiteProfile siteProfile = (SiteProfile)comboBoxSites.SelectedItem; string customPage = "http://www." + siteProfile.Domain; textBoxCustomPage.Text = customPage; }
protected void Submit_Click(object sender, EventArgs e) { var _spContext = SharePointContextProvider.Current.GetSharePointContext(Context); SiteProfile _profile = new SiteProfile(); _profile.SitePolicy = this.GetSiteClassification(); Dictionary <string, string> _customProps = new Dictionary <string, string>(); _customProps.Add(SiteClassificationKeys.AudienceReachKey, this.GetAudience()); _customProps.Add(SiteClassificationKeys.BusinessImpactKey, _profile.SitePolicy); _profile.CustomProperties = _customProps; using (var _ctx = _spContext.CreateUserClientContextForSPHost()) { ISiteClassificationFactory _factory = SiteClassificationFactory.GetInstance(); ISiteClassificationManager _manager = _factory.GetManager(_ctx); _manager.SaveSiteProperties(_ctx, _profile); AddJsLink(_ctx, _ctx.Web); } Response.Redirect(this.Url.Value); }
protected void SetAvaibleSitePolicies(SiteProfile profile) { List <SitePolicyEntity> policies = _ctx.Web.GetSitePolicies(); foreach (var policy in policies) { this.BusinessImpact.Items.Add(policy.Name); } this.BusinessImpact.SelectedIndex = this.BusinessImpact.Items.IndexOf(this.BusinessImpact.Items.FindByText(profile.SitePolicy)); }
protected void SetExpirationDate(SiteProfile profile) { if (profile.ExpirationDate != DateTime.MinValue) { this.lblExpirationDate.Text = String.Format("{0}", profile.ExpirationDate); } else { this.lblExpirationDate.Text = string.Format("{0}", "NO EXPIRATION DATE"); } }
protected void SetSiteClassification(SiteProfile profile) { if (!string.IsNullOrEmpty(profile.SitePolicy)) { this.lblSitePolicy.Text = string.Format("{0}", profile.SitePolicy); } else { this.lblSitePolicy.Text = string.Format("{0}", "None"); } }
private void SetUI() { SiteProfile _siteProfile = GetSiteProfile(_ctx); if (_siteProfile.CustomProperties.ContainsKey(SiteClassificationKeys.AudienceReachKey)) { SetAudience(_siteProfile.CustomProperties[SiteClassificationKeys.AudienceReachKey]); } this.SetExpirationDate(_siteProfile); this.SetSiteClassification(_siteProfile); this.SetAvaibleSitePolicies(_siteProfile); }
public void PaymentRequest_GivenValidConstructorArguments_FormatsListItemTaxToTwoPlaces() { //arrange var siteSettings = new SiteSetting(); var siteProfile = new SiteProfile(); //act var options = new PaymentRequestOptions(siteProfile, siteSettings, ConfigurationStubs.ProductionCheckoutUri); var sut = new PaymentRequest(CartViewStubs.Get(), options); var actual = sut.ItemList.items.FirstOrDefault()?.tax.Split('.')[1]; //assert Assert.Equal(2, actual?.Length); }
public void PaymentRequest_GivenValidConstructorArguments_FormatsTaxWithToDecimalPlaces() { //arrange var siteSettings = new SiteSetting(); var siteProfile = new SiteProfile(); //act var options = new PaymentRequestOptions(siteProfile, siteSettings, ConfigurationStubs.ProductionCheckoutUri); var sut = new PaymentRequest(CartViewStubs.Get(), options); var actual = sut.Tax.Split('.')[1]; //assert Assert.Equal(2, actual.Length); }
public void PaymentRequest_GivenAValidUri_SetsRedirectUrlCorrectly() { //arrange var siteSettings = new SiteSetting(); var siteProfile = new SiteProfile(); //act var options = new PaymentRequestOptions(siteProfile, siteSettings, ConfigurationStubs.ProductionCheckoutUri); var sut = new PaymentRequest(CartViewStubs.Get(), options); var actual = sut.ReturnUrl; //asserts Assert.Equal("https://bluetapecrew.com/checkoutreview", actual); }
public WindowCurlPlay(SiteProfile siteProfile, Action <SiteProfile> actionSaveProfile) { InitializeComponent(); Preference preference = App.GlobalPreference; Left = preference.WindowCurlRunner.X; Top = preference.WindowCurlRunner.Y; Width = preference.WindowCurlRunner.W; Height = preference.WindowCurlRunner.H; DataContext = new CurlPlayVModel(siteProfile, actionSaveProfile); Closing += WindowCurl_Closing; }
// OPTIONS TAB private void buttonSaveSettings_Click(object sender, RoutedEventArgs e) { if (radioButton2Captcha.IsChecked == true) { Manager.use2Captcha = true; Manager.useAntiCaptcha = false; Manager.api2CaptchaKey = textBoxCaptchaApiKey.Password; Manager.myKey = Manager.api2CaptchaKey; } else if (radioButtonAntiCaptcha.IsChecked == true) { Manager.use2Captcha = false; Manager.useAntiCaptcha = true; Manager.apiAntiCaptchaKey = textBoxCaptchaApiKey.Password; Manager.myKey = Manager.apiAntiCaptchaKey; } string captchaSiteKey = textBoxSiteKey.Text; Manager.siteKey = captchaSiteKey; SiteProfile selectedProfile = comboBoxSites.SelectedItem as SiteProfile; if (selectedProfile == null) { this.ShowMessageAsync("Error!", "Please select country!", MessageDialogStyle.Affirmative); return; } Manager.selectedProfile = selectedProfile; Manager.sizes = Manager.selectedProfile.Sizes; comboBoxSizes.ItemsSource = Manager.sizes.Keys; Manager.customPage = textBoxCustomPage.Text; if (Manager.customPage == null || Manager.customPage == string.Empty) { Manager.customPage = "http://www." + Manager.selectedProfile.Domain; } Manager.saveToRegistry("siteKey", captchaSiteKey); Manager.saveToRegistry("2captchaApiKey", Manager.api2CaptchaKey); Manager.saveToRegistry("antiCaptchaApiKey", Manager.apiAntiCaptchaKey); this.ShowMessageAsync("Saved!", "Setting saved successfully!", MessageDialogStyle.Affirmative); }
private void DeleteProfile(object selected) { if (selected is SiteProfile profileDelete) { SiteProfile profile = SiteListOC.FirstOrDefault(item => item.Title == profileDelete.Title && item.Website == profileDelete.Website); if (profile != null) { SiteListOC.Remove(profile); // convert to list and save List <SiteProfile> siteProfiles = new List <SiteProfile>(SiteListOC); SiteManager.SaveNew(siteProfiles); } } }
private Action <SiteProfile> actionSaveProfile; // callback action public CurlPlayVModel(SiteProfile siteProfile, Action <SiteProfile> actionSaveProfile) { Profile = siteProfile; Progress = new ProgressInfo(0, false); WindowProgress = 0; IsNotRunning = true; IsRandomDelay = Profile.DelayMax > Profile.DelayMin; DelaySetting = IsRandomDelay ? $"{Profile.DelayMin} - {Profile.DelayMax}" : Profile.DelayMin.ToString(); ResponseList = new ObservableCollection <CurlResponse>(); siteWorker = new SiteWorker(OnStateUpdated, OnSiteResponse); this.actionSaveProfile = actionSaveProfile; }
public SiteProfile GetSiteProfile(ClientContext ctx) { var _siteProfile = new SiteProfile() { CustomProperties = this.GetCustomProfileProperties(ctx), ExpirationDate = ctx.Web.GetSiteExpirationDate() }; SitePolicyEntity _sitePolicy = ctx.Web.GetAppliedSitePolicy(); if (_sitePolicy != null) { _siteProfile.SitePolicy = _sitePolicy.Name; } return(_siteProfile); }
private string GetConfigValue(string name, string site) { SiteProfile siteProfile = _dbContext.Set <SiteProfile>().Where(s => s.Name == name && s.Site == site).FirstOrDefault(); if (siteProfile != null) { return(siteProfile.Value); } SystemProfile systemProfile = _dbContext.Set <SystemProfile>().Where(s => s.Name == name).FirstOrDefault(); if (systemProfile != null) { return(systemProfile.Value); } return(""); }
/** Actions =============================================================================== */ private void OnSaveProfile(SiteProfile profile) { SiteProfile profileNew = profile.Copy(); SiteProfile profileOld = SiteListOC.FirstOrDefault(item => item.Title == profileNew.Title && item.Website == profileNew.Website); if (profileOld != null) { int index = SiteListOC.IndexOf(profileOld); SiteListOC[index] = profileNew; } else { SiteListOC.Add(profileNew); } // convert to list and save List <SiteProfile> siteProfiles = new List <SiteProfile>(SiteListOC); SiteManager.SaveNew(siteProfiles); }
internal PhpWorkloadResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, WorkloadKind kind, WorkloadsSku sku, PhpWorkloadResourceIdentity identity, AzureLocation?appLocation, ManagedRGConfiguration managedResourceGroupConfiguration, UserProfile adminUserProfile, VmssNodesProfile webNodesProfile, NodeProfile controllerProfile, NetworkProfile networkProfile, DatabaseProfile databaseProfile, SiteProfile siteProfile, FileshareProfile fileshareProfile, PhpProfile phpProfile, SearchProfile searchProfile, CacheProfile cacheProfile, BackupProfile backupProfile, PhpWorkloadProvisioningState?provisioningState) : base(id, name, resourceType, systemData, tags, location) { Kind = kind; Sku = sku; Identity = identity; AppLocation = appLocation; ManagedResourceGroupConfiguration = managedResourceGroupConfiguration; AdminUserProfile = adminUserProfile; WebNodesProfile = webNodesProfile; ControllerProfile = controllerProfile; NetworkProfile = networkProfile; DatabaseProfile = databaseProfile; SiteProfile = siteProfile; FileshareProfile = fileshareProfile; PhpProfile = phpProfile; SearchProfile = searchProfile; CacheProfile = cacheProfile; BackupProfile = backupProfile; ProvisioningState = provisioningState; }
/// <summary> /// override method of BaseAction.<br></br> /// </summary> /// <param name="context">input parameter</param> /// <returns>if successful,return the result.</returns> public override BaseActionResult Execute(Context context) { DataSetActionResult result = new DataSetActionResult(); SiteProfile systemProfile = new SiteProfile(); DsSiteProfileModel model = context.Model as DsSiteProfileModel; DataSet ds = null; if (!string.IsNullOrWhiteSpace(model.SiteName)) { ds = systemProfile.Load(model.ModuleID, model.SiteName); } else { ds = systemProfile.Load(model.ModuleID); } result.Result = true; result.DataSetData = ds; return(result); }
/// <summary> /// add or update online info when login /// </summary> /// <param name="onlineClientDto"></param> /// <returns>0:sucess;1:error, same user login on other location;2:error, max user; 3:same user login in other location 4: can not get license data 5:license expired</returns> public int LoginToOnline(OnlineClientDto onlineClientDto, string isForce, out string message) { message = ""; List <OnlineClient> onlineClientList = _OnlineClientRepository.Get(o => o.MachineIP == onlineClientDto.MachineIP && o.IsOnline == 1).ToList(); foreach (OnlineClient onlineClient in onlineClientList) { //not selfservice login user if ((onlineClient.Comments == null || onlineClient.Comments.ToLower() != "selfservice login user") && string.Compare(onlineClient.UniqueID, onlineClientDto.UniqueID, true) != 0) { //同一台机器上只能允许登陆1次,请退出后再登陆! if (isForce == "0") { UserDto user = GetUserByID(onlineClient.UniqueID); if (user != null) { message = user.LoginName; } return(1); } else { //onlineClient.IsOnline = 0; } } } //get max value string countName = "OnlineUserCheckTimePeriod"; string countValue = null; int currentOnline = 0; SystemProfile systemProfile = null; SiteProfile siteProfile = _dbContext.Set <SiteProfile>().Where(s => s.Name == countName && s.Domain == onlineClientDto.Domain && s.Site == onlineClientDto.Site).FirstOrDefault(); if (siteProfile != null && siteProfile.Value != null) { countValue = siteProfile.Value; currentOnline = _OnlineClientRepository.Get(o => o.IsOnline == 1 && o.Domain == onlineClientDto.Domain && o.Site == onlineClientDto.Site).Count(); } else { systemProfile = _dbContext.Set <SystemProfile>().Where(s => s.Name == countName && s.Domain == onlineClientDto.Domain).FirstOrDefault(); if (systemProfile != null && systemProfile.Value != null) { countValue = systemProfile.Value; currentOnline = _OnlineClientRepository.Get(o => o.IsOnline == 1 && o.Domain == onlineClientDto.Domain).Count(); } } if (countValue != null) { //Max user count reached int profileMaxUserNumber = GetMaxOnlineUserCount(countValue); if (currentOnline >= profileMaxUserNumber) { return(2); } } List <OnlineClient> onlineClientList2 = _OnlineClientRepository.Get(o => o.UniqueID == onlineClientDto.UniqueID && o.IsOnline == 1).ToList(); foreach (OnlineClient onlineClient in onlineClientList2) { //not selfservice login user //if ((onlineClient.Comments == null || onlineClient.Comments.ToLower() != "selfservice login user") // && (string.Compare(onlineClient.MachineIP, onlineClientDto.MachineIP, true) != 0 // || string.Compare(onlineClient.Comments, onlineClientDto.Comments, true) != 0)) if (onlineClient.Comments != null && onlineClient.Comments.ToLower() != "selfservice login user" && string.Compare(onlineClient.MachineIP, onlineClientDto.MachineIP, true) != 0) { //同一用户只能在一个地方登录 if (isForce == "0") { message = onlineClient.MachineName + "&" + onlineClient.MachineIP; return(3); } else { //onlineClient.IsOnline = 0; } } } //clear all offline List <OnlineClient> onlineClientList3 = _OnlineClientRepository.Get(o => o.UniqueID == onlineClientDto.UniqueID && o.IsOnline == 0).ToList(); foreach (OnlineClient onlineClient in onlineClientList3) { _OnlineClientRepository.Delete(onlineClient); } _OnlineClientRepository.SaveChanges(); //add or update online data string webUserFlag = "web login user"; // check web license var webOnline = _OnlineClientRepository.Get(o => o.IsOnline == 1 && o.Domain == onlineClientDto.Domain && o.Comments == webUserFlag).Count(); if (_license.IsSuccessed) { if (_license.IsExpired) { return(5); } if (webOnline >= _license.MaxOnlineUserCount) { return(2); } } else { return(4); } OnlineClient onlineClientOld = _OnlineClientRepository.Get(o => o.UniqueID == onlineClientDto.UniqueID && o.Comments != "selfservice login user").FirstOrDefault(); if (onlineClientOld != null && onlineClientOld.IsOnline == 1) { } else { OnlineClient onlineClientNew = Mapper.Map <OnlineClientDto, OnlineClient>(onlineClientDto); onlineClientNew.RoleName = GetUserDefaultRole(new UserDto { UniqueID = onlineClientDto.UniqueID, Domain = onlineClientDto.Domain }); _OnlineClientRepository.Add(onlineClientNew); _OnlineClientRepository.SaveChanges(); } return(0); }
public void SaveSiteProperties(ClientContext ctx, SiteProfile profile) { var _customProperties = profile.CustomProperties; ctx.Web.ApplySitePolicy(profile.SitePolicy); CamlQuery _query = new CamlQuery(); var _siteInfoList = ctx.Web.Lists.GetByTitle(SiteClassificationList.SiteClassificationListTitle); ListItemCollection _items = _siteInfoList.GetItems(_query); ctx.Load(_items, eachItem => eachItem.Include( item => item, item => item[SiteClassificationFields.FLD_KEY_INTERNAL_NAME], item => item[SiteClassificationFields.FLD_VALUE_INTERNAL_NAME])); ctx.ExecuteQuery(); if (_items.Count > 0) { foreach(var _item in _items) { this.SetListItemValue(_siteInfoList, _item, _customProperties); } _siteInfoList.Update(); ctx.ExecuteQuery(); } }
public SiteProfile GetSiteProfile(ClientContext ctx) { var _siteProfile = new SiteProfile() { CustomProperties = this.GetCustomProfileProperties(ctx), ExpirationDate = ctx.Web.GetSiteExpirationDate() }; SitePolicyEntity _sitePolicy = ctx.Web.GetAppliedSitePolicy(); if(_sitePolicy != null) { _siteProfile.SitePolicy = _sitePolicy.Name; } return _siteProfile; }
public static void Init() { using (var db = new MobileContext()) { db.Database.Migrate(); } var siteProfile = new SiteProfile() { Page = new Uri("https://www.g2g.com/") }; var chromeProfile = new ChromeProfile("main"); var initWorker = new G2gWorker(chromeProfile); var checkLogin = new CheckAutorizationOperation(siteProfile); var authorization = new AutorizationOperation(); initWorker.OperationExecuted += onOperacionExecuted; initWorker.Start(); initWorker.AddOperation(checkLogin); void onOperacionExecuted(OperationResult operationResult) { if (operationResult.CurrentOpeartion is CheckAutorizationOperation) { var isSuccessAutorization = (bool)operationResult.Value; if (isSuccessAutorization == false) { initWorker.AddOperation(authorization); } else { initWorkers(false); } } if (operationResult.CurrentOpeartion is AutorizationOperation) { initWorkers(true); } } void initWorkers(bool isCopyProfile) { initWorker.OperationExecuted -= onOperacionExecuted; //TODO рекурсия initWorker.StopAsync().Wait(); for (int i = 0; i < RolesList.Count; i++) { var newCromeId = $"{chromeProfile.Id}__{i}"; var newProfile = isCopyProfile ? chromeProfile.CopyProfileDirectory(newCromeId) : new ChromeProfile(newCromeId); var newWorker = new G2gWorker(newProfile) { Role = RolesList[i] }; newWorker.Start(); Workers.Add(newWorker); } } }
internal static PhpWorkloadResourceData DeserializePhpWorkloadResourceData(JsonElement element) { WorkloadKind kind = default; Optional <WorkloadsSku> sku = default; Optional <PhpWorkloadResourceIdentity> identity = default; IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <AzureLocation> appLocation = default; Optional <ManagedRGConfiguration> managedResourceGroupConfiguration = default; Optional <UserProfile> adminUserProfile = default; Optional <VmssNodesProfile> webNodesProfile = default; Optional <NodeProfile> controllerProfile = default; Optional <NetworkProfile> networkProfile = default; Optional <DatabaseProfile> databaseProfile = default; Optional <SiteProfile> siteProfile = default; Optional <FileshareProfile> fileshareProfile = default; Optional <PhpProfile> phpProfile = default; Optional <SearchProfile> searchProfile = default; Optional <CacheProfile> cacheProfile = default; Optional <BackupProfile> backupProfile = default; Optional <PhpWorkloadProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind")) { kind = new WorkloadKind(property.Value.GetString()); continue; } if (property.NameEquals("sku")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } sku = WorkloadsSku.DeserializeWorkloadsSku(property.Value); continue; } if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } identity = PhpWorkloadResourceIdentity.DeserializePhpWorkloadResourceIdentity(property.Value); continue; } if (property.NameEquals("tags")) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, property0.Value.GetString()); } tags = dictionary; continue; } if (property.NameEquals("location")) { location = new AzureLocation(property.Value.GetString()); continue; } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("appLocation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } appLocation = new AzureLocation(property0.Value.GetString()); continue; } if (property0.NameEquals("managedResourceGroupConfiguration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } managedResourceGroupConfiguration = ManagedRGConfiguration.DeserializeManagedRGConfiguration(property0.Value); continue; } if (property0.NameEquals("adminUserProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } adminUserProfile = UserProfile.DeserializeUserProfile(property0.Value); continue; } if (property0.NameEquals("webNodesProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } webNodesProfile = VmssNodesProfile.DeserializeVmssNodesProfile(property0.Value); continue; } if (property0.NameEquals("controllerProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } controllerProfile = NodeProfile.DeserializeNodeProfile(property0.Value); continue; } if (property0.NameEquals("networkProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } networkProfile = NetworkProfile.DeserializeNetworkProfile(property0.Value); continue; } if (property0.NameEquals("databaseProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } databaseProfile = DatabaseProfile.DeserializeDatabaseProfile(property0.Value); continue; } if (property0.NameEquals("siteProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } siteProfile = SiteProfile.DeserializeSiteProfile(property0.Value); continue; } if (property0.NameEquals("fileshareProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } fileshareProfile = FileshareProfile.DeserializeFileshareProfile(property0.Value); continue; } if (property0.NameEquals("phpProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } phpProfile = PhpProfile.DeserializePhpProfile(property0.Value); continue; } if (property0.NameEquals("searchProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } searchProfile = SearchProfile.DeserializeSearchProfile(property0.Value); continue; } if (property0.NameEquals("cacheProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } cacheProfile = CacheProfile.DeserializeCacheProfile(property0.Value); continue; } if (property0.NameEquals("backupProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } backupProfile = BackupProfile.DeserializeBackupProfile(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new PhpWorkloadProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new PhpWorkloadResourceData(id, name, type, systemData, tags, location, kind, sku.Value, identity.Value, Optional.ToNullable(appLocation), managedResourceGroupConfiguration.Value, adminUserProfile.Value, webNodesProfile.Value, controllerProfile.Value, networkProfile.Value, databaseProfile.Value, siteProfile.Value, fileshareProfile.Value, phpProfile.Value, searchProfile.Value, cacheProfile.Value, backupProfile.Value, Optional.ToNullable(provisioningState))); }