@@ -182,29 +182,30 @@ void SetUpdateNotificationPage()
182182 new NTitleControl ( page , Index + 1 , list . Count , n . Date , n . Title ) . Add ( ) ;
183183
184184 // Check constraints for the MetList.
185- var failingCheck = ( n . Met . ItemList ? . Count > 0 && n . Met . CheckIdList ? . Count > 0 )
186- ? CheckConstraints ( n )
187- : null ;
185+ // var failingCheck = (n.Met.ItemList?.Count > 0 && n.Met.CheckIdList?.Count > 0)
186+ // ? CheckConstraints(n)
187+ // : null;
188188
189189 // If any check fails then its UnmetList is added to the page, otherwise the MetList is added.
190- n . PrefixItemList ? . ForEach ( item => AddItemToPage ( page , item ) ) ;
191- if ( failingCheck == null )
192- {
193- n . Met . ItemList ? . ForEach ( item => AddItemToPage ( page , item ) ) ;
194- }
195- else
196- {
197- if ( failingCheck . UnmetItemList == null ) // Omit this section to skip the notification entirely.
198- {
199- // Don't skip if there is only one notification.
200- if ( list . Count > 1 ) skipPage = true ;
201- }
202- else
203- {
204- failingCheck . UnmetItemList ? . ForEach ( item => AddItemToPage ( page , item ) ) ;
205- }
206- }
207- n . SuffixItemList ? . ForEach ( item => AddItemToPage ( page , item ) ) ;
190+ //n.PrefixItemList?.ForEach(item => AddItemToPage(page, item));
191+ //if (failingCheck == null)
192+ //{
193+ // n.Met.ItemList?.ForEach(item => AddItemToPage(page, item));
194+ //}
195+ //else
196+ //{
197+ // if (failingCheck.UnmetItemList == null) // Omit this section to skip the notification entirely.
198+ // {
199+ // // Don't skip if there is only one notification.
200+ // if (list.Count > 1) skipPage = true;
201+ // }
202+ // else
203+ // {
204+ // failingCheck.UnmetItemList?.ForEach(item => AddItemToPage(page, item));
205+ // }
206+ //}
207+ //n.SuffixItemList?.ForEach(item => AddItemToPage(page, item));
208+ n . ItemList ? . ForEach ( item => AddItemToPage ( page , item ) ) ;
208209 if ( skipPage == false ) PageList . Add ( page ) ;
209210 }
210211
@@ -218,24 +219,24 @@ void SetUpdateNotificationPage()
218219 private Check CheckConstraints ( Notification n )
219220 {
220221 Check failingCheck = null ;
221- foreach ( var nc in n . Met . CheckIdList ) // CheckIdList is optional
222+ foreach ( var checkName in n . CheckIdList ) // CheckIdList is optional
222223 {
223- LogChecks ( nc ) ;
224+ LogChecks ( checkName ) ;
224225
225226 // Find the matching check
226- var check = Notifications . CheckList . Where ( c => c . Id == nc . Id ) . FirstOrDefault ( ) ;
227+ var check = Notifications . CheckList . Where ( c => c . Id == checkName ) . FirstOrDefault ( ) ;
227228 if ( check != null && check . AnyOfList . Count ( ) > 0 )
228229 {
229230 foreach ( var anyOf in check . AnyOfList )
230231 {
231- if ( anyOf is Excludes )
232- {
233- if ( CheckAllMatch ( anyOf . AllOfList ) == true ) return check ; // immediate fail so quit
234- }
235- if ( anyOf is Includes )
236- {
237- if ( CheckAllMatch ( anyOf . AllOfList ) == false ) failingCheck = check ; // fail but continue testing other Includes
238- }
232+ // if (anyOf is Excludes)
233+ // {
234+ // if (CheckAllMatch(anyOf.AllOfList) == true) return check; // immediate fail so quit
235+ // }
236+ // if (anyOf is Includes)
237+ // {
238+ // if (CheckAllMatch(anyOf.AllOfList) == false) failingCheck = check; // fail but continue testing other Includes
239+ // }
239240 }
240241 }
241242 }
@@ -323,9 +324,9 @@ public void DropUnusedUpdateNotifications()
323324 continue ;
324325
325326 // Mark unused updates for deletion outside loop
326- n . ToDelete = lowerUpdateMode != updateModeSetting ;
327+ // n.ToDelete = lowerUpdateMode != updateModeSetting;
327328 }
328- Notifications . NotificationList . RemoveAll ( n => n . ToDelete ) ;
329+ // Notifications.NotificationList.RemoveAll(n => n.ToDelete);
329330 }
330331
331332 public void ReplaceParameters ( )
@@ -334,9 +335,10 @@ public void ReplaceParameters()
334335 {
335336 n . Title = ReplaceParameter ( n . Title ) ;
336337 n . Date = ReplaceParameter ( n . Date ) ;
337- n . PrefixItemList ? . ForEach ( item => ReplaceItemParameter ( item ) ) ;
338- n . Met . ItemList ? . ForEach ( item => ReplaceItemParameter ( item ) ) ;
339- n . SuffixItemList ? . ForEach ( item => ReplaceItemParameter ( item ) ) ;
338+ //n.PrefixItemList?.ForEach(item => ReplaceItemParameter(item));
339+ //n.Met.ItemList?.ForEach(item => ReplaceItemParameter(item));
340+ //n.SuffixItemList?.ForEach(item => ReplaceItemParameter(item));
341+ n . ItemList ? . ForEach ( item => ReplaceItemParameter ( item ) ) ;
340342 }
341343 foreach ( var list in Notifications . CheckList )
342344 {
@@ -557,9 +559,9 @@ public void LogNotification(Notification n)
557559 {
558560 AppendToLog ( $ "Notification: { n . Title } ") ;
559561 }
560- public void LogChecks ( CheckId ci )
562+ public void LogChecks ( string checkName )
561563 {
562- AppendToLog ( $ "CheckId: { ci . Id } ") ;
564+ AppendToLog ( $ "CheckId: { checkName } ") ;
563565 }
564566 public void LogCheckContains ( string value , bool sense , string content , bool result )
565567 {
0 commit comments