protected override void InternalProcessRecord() { TaskLogger.LogEnter(); base.InternalProcessRecord(); PolicySettingStatusHelpers.CheckNotificationResultsAndUpdateStatus(this, (IConfigurationSession)base.DataSession, this.OnNotifyChanges()); TaskLogger.LogExit(); }
protected override void InternalProcessRecord() { TaskLogger.LogEnter(); this.RuleStorages = Utils.LoadRuleStoragesByPolicy(base.DataSession, base.DataObject, this.RootId); IList <BindingStorage> list = Utils.LoadBindingStoragesByPolicy(base.DataSession, base.DataObject); foreach (RuleStorage ruleStorage in this.RuleStorages) { base.WriteVerbose(Strings.VerboseLoadRuleStorageObjectsForPolicy(ruleStorage.ToString(), base.DataObject.ToString())); } if (!this.ShouldSoftDeleteObject()) { Utils.RemovePolicyStorageBase(base.DataSession, new WriteVerboseDelegate(base.WriteVerbose), this.RuleStorages); Utils.RemovePolicyStorageBase(base.DataSession, new WriteVerboseDelegate(base.WriteVerbose), list); } else { list = null; } base.InternalProcessRecord(); if (this.ShouldSoftDeleteObject()) { PolicySettingStatusHelpers.CheckNotificationResultsAndUpdateStatus(this, (IConfigurationSession)base.DataSession, this.OnNotifyChanges(list, this.RuleStorages)); } TaskLogger.LogExit(); }
protected override void InternalProcessRecord() { TaskLogger.LogEnter(); if (this.RetryDistribution) { this.RetryPolicyDistribution(); } else { foreach (BindingStorage bindingStorage in this.PsPolicyPresentationObject.StorageBindings) { if (bindingStorage.AppliedScopes.Any <ScopeStorage>()) { base.DataSession.Save(bindingStorage); base.WriteVerbose(Strings.VerboseSaveBindingStorageObjects(bindingStorage.ToString(), this.PsPolicyPresentationObject.Name)); } else { base.DataSession.Delete(bindingStorage); base.WriteVerbose(Strings.VerboseDeleteBindingStorageObjects(bindingStorage.ToString(), this.PsPolicyPresentationObject.Name)); } } IEnumerable <RuleStorage> enumerable = Utils.LoadRuleStoragesByPolicy(base.DataSession, this.DataObject, this.RootId); foreach (RuleStorage ruleStorage in enumerable) { base.WriteVerbose(Strings.VerboseLoadRuleStorageObjectsForPolicy(ruleStorage.ToString(), this.DataObject.ToString())); } Utils.ThrowIfRulesInPolicyAreTooAdvanced(enumerable, this.DataObject, this, base.DataSession as IConfigurationSession); base.InternalProcessRecord(); PolicySettingStatusHelpers.CheckNotificationResultsAndUpdateStatus(this, (IConfigurationSession)base.DataSession, this.OnNotifyChanges()); } TaskLogger.LogExit(); }
private void HandleNotificationErrors(string notificationError, IEnumerable <ChangeNotificationData> syncData) { if (!string.IsNullOrEmpty(notificationError)) { base.WriteWarning(notificationError); AggregatedNotificationClients.SetNotificationResults(syncData, notificationError); PolicySettingStatusHelpers.CheckNotificationResultsAndUpdateStatus(this, (IConfigurationSession)base.DataSession, syncData); } }
protected override void InternalProcessRecord() { TaskLogger.LogEnter(); this.PsPolicyPresentationObject.UpdateStorageProperties(this, base.DataSession as IConfigurationSession, true); base.InternalProcessRecord(); foreach (BindingStorage bindingStorage in this.PsPolicyPresentationObject.StorageBindings) { base.DataSession.Save(bindingStorage); base.WriteVerbose(Strings.VerboseSaveBindingStorageObjects(bindingStorage.ToString(), this.PsPolicyPresentationObject.ToString())); } if (!base.HasErrors) { this.WriteResult(); } PolicySettingStatusHelpers.CheckNotificationResultsAndUpdateStatus(this, (IConfigurationSession)base.DataSession, this.OnNotifyChanges()); TaskLogger.LogExit(); }