protected virtual string OnNotifyRetryDistributionChanges(List <ChangeNotificationData> itemsToSync, Workload workload, bool isObjectLevelSync) { string text; return(AggregatedNotificationClients.NotifyChangesByWorkload(this, (IConfigurationSession)base.DataSession, workload, from ols in itemsToSync select ols.CreateSyncChangeInfo(isObjectLevelSync), false, false, this.executionLogger, base.GetType(), out text)); }
private void SendNotification() { foreach (object obj in Enum.GetValues(typeof(Workload))) { Workload workload = (Workload)obj; if ((this.Workload & workload) != Workload.None) { string identity; string text = AggregatedNotificationClients.NotifyChangesByWorkload(this, base.DataSession as IConfigurationSession, workload, this.syncChangeInfos, this.FullSync.ToBool(), true, this.executionLogger, base.GetType(), out identity); if (string.IsNullOrEmpty(text)) { this.WriteResult(new PsUnifiedPolicyNotification(workload, identity, this.syncChangeInfos, this.FullSync.ToBool())); } else { base.WriteWarning(text); } } } }
private static Dictionary <Workload, List <ChangeNotificationData> > NotifyChanges(Task task, IConfigurationSession configurationSession, IEnumerable <UnifiedPolicyStorageBase> policyStorageObjects, ExecutionLog logger, Type client) { Dictionary <Workload, List <ChangeNotificationData> > dictionary = AggregatedNotificationClients.CreateSyncChangeDataGroupedByWorkload(policyStorageObjects); foreach (KeyValuePair <Workload, List <ChangeNotificationData> > keyValuePair in dictionary) { IEnumerable <SyncChangeInfo> enumerable = from s in keyValuePair.Value where s.ShouldNotify select s into d select d.CreateSyncChangeInfo(false); if (enumerable.Any <SyncChangeInfo>()) { string text2; string text = AggregatedNotificationClients.NotifyChangesByWorkload(task, configurationSession, keyValuePair.Key, enumerable, false, false, logger, client, out text2); if (!string.IsNullOrEmpty(text)) { task.WriteWarning(Strings.WarningNotifyWorkloadFailed(keyValuePair.Key.ToString())); } AggregatedNotificationClients.SetNotificationResults(keyValuePair.Value, text); } } return(dictionary); }