@@ -40,8 +40,8 @@ public class SyndicationFeed : IExtensibleSyndicationObject
4040 // optional RSS tags
4141 private SyndicationLink _documentation ;
4242 private int ? _timeToLive ;
43- private ICollection < int > _skipHours ;
44- private ICollection < string > _skipDays ;
43+ private Collection < int > _skipHours ;
44+ private Collection < string > _skipDays ;
4545 private SyndicationTextInput _textInput ;
4646
4747 public SyndicationFeed ( )
@@ -325,54 +325,50 @@ public int TimeToLive
325325 }
326326 }
327327
328- internal ICollection < int > InternalSkipHours
328+ internal Collection < int > InternalSkipHours
329329 {
330330 get
331331 {
332332 return _skipHours ;
333333 }
334334 }
335335
336- public ICollection < int > SkipHours
336+ public Collection < int > SkipHours
337337 {
338338 get
339339 {
340340 if ( _skipHours == null )
341341 {
342- _skipHours = TryReadSkipHoursFromExtension ( ElementExtensions ) ;
342+ var skipHours = new Collection < int > ( ) ;
343+ TryReadSkipHoursFromExtension ( ElementExtensions , skipHours ) ;
344+ _skipHours = skipHours ;
343345 }
344346
345347 return _skipHours ;
346348 }
347- set
348- {
349- _skipHours = value ;
350- }
351349 }
352350
353- internal ICollection < string > InternalSkipDays
351+ internal Collection < string > InternalSkipDays
354352 {
355353 get
356354 {
357355 return _skipDays ;
358356 }
359357 }
360358
361- public ICollection < string > SkipDays
359+ public Collection < string > SkipDays
362360 {
363361 get
364362 {
365363 if ( _skipDays == null )
366364 {
367- _skipDays = TryReadSkipDaysFromExtension ( ElementExtensions ) ;
365+ var skipDays = new Collection < string > ( ) ;
366+ TryReadSkipDaysFromExtension ( ElementExtensions , skipDays ) ;
367+ _skipDays = skipDays ;
368368 }
369369
370370 return _skipDays ;
371371 }
372- set
373- {
374- _skipDays = value ;
375- }
376372 }
377373
378374 internal SyndicationTextInput InternalTextInput
@@ -433,16 +429,15 @@ private SyndicationLink TryReadDocumentationFromExtension(SyndicationElementExte
433429 }
434430 }
435431
436- private Collection < int > TryReadSkipHoursFromExtension ( SyndicationElementExtensionCollection elementExtensions )
432+ private void TryReadSkipHoursFromExtension ( SyndicationElementExtensionCollection elementExtensions , Collection < int > skipHours )
437433 {
438434 SyndicationElementExtension skipHoursElement = elementExtensions
439435 . Where ( ( e ) => e . OuterName == Rss20Constants . SkipHoursTag && e . OuterNamespace == Rss20Constants . Rss20Namespace )
440436 . FirstOrDefault ( ) ;
441437
442438 if ( skipHoursElement == null )
443- return null ;
439+ return ;
444440
445- var skipHours = new Collection < int > ( ) ;
446441 using ( XmlReader reader = skipHoursElement . GetReader ( ) )
447442 {
448443 reader . ReadStartElement ( ) ;
@@ -474,20 +469,17 @@ private Collection<int> TryReadSkipHoursFromExtension(SyndicationElementExtensio
474469 }
475470 }
476471 }
477-
478- return skipHours ;
479472 }
480473
481- private Collection < string > TryReadSkipDaysFromExtension ( SyndicationElementExtensionCollection elementExtensions )
474+ private void TryReadSkipDaysFromExtension ( SyndicationElementExtensionCollection elementExtensions , Collection < string > skipDays )
482475 {
483476 SyndicationElementExtension skipDaysElement = elementExtensions
484477 . Where ( ( e ) => e . OuterName == Rss20Constants . SkipDaysTag && e . OuterNamespace == Rss20Constants . Rss20Namespace )
485478 . FirstOrDefault ( ) ;
486479
487480 if ( skipDaysElement == null )
488- return null ;
481+ return ;
489482
490- var skipDays = new Collection < string > ( ) ;
491483 using ( XmlReader reader = skipDaysElement . GetReader ( ) )
492484 {
493485 reader . ReadStartElement ( ) ;
@@ -512,8 +504,6 @@ private Collection<string> TryReadSkipDaysFromExtension(SyndicationElementExtens
512504
513505 reader . ReadEndElement ( ) ;
514506 }
515-
516- return skipDays ;
517507 }
518508
519509 private bool checkDay ( string day )
0 commit comments