@@ -103,7 +103,7 @@ public async Task<BaseCrawlFacade<TPost, TBaseRevision, TResponse, TPostProtoBuf
103103 }
104104
105105 public async Task < SaverChangeSet < TPost > ? > RetryThenSave
106- ( IList < Page > pages , Func < Page , FailureCount > failureCountSelector , CancellationToken stoppingToken = default )
106+ ( IReadOnlyList < Page > pages , Func < Page , FailureCount > failureCountSelector , CancellationToken stoppingToken = default )
107107 {
108108 if ( _lockingPages . Count != 0 ) ThrowHelper . ThrowInvalidOperationException (
109109 "RetryPages() can only be called once, a instance of BaseCrawlFacade shouldn't be reuse for other crawls." ) ;
@@ -136,14 +136,14 @@ private void ValidateThenParse(BaseCrawler<TResponse, TPostProtoBuf>.Response re
136136 parsedPostsInResponse . ForEach ( pair => Posts [ pair . Key ] = pair . Value ) ;
137137 if ( flag == CrawlRequestFlag . None )
138138 {
139- if ( postsEmbeddedUsers . Count == 0 && postsInResponse . Any ( ) ) ThrowIfEmptyUsersEmbedInPosts ( ) ;
139+ if ( postsEmbeddedUsers . Count == 0 && postsInResponse . Count != 0 ) ThrowIfEmptyUsersEmbedInPosts ( ) ;
140140 if ( postsEmbeddedUsers . Count != 0 ) UserParser . Parse ( postsEmbeddedUsers ) ;
141141 }
142142 PostParseHook ( response , flag , parsedPostsInResponse ) ;
143143 }
144144
145145 private async Task CrawlPages (
146- IList < Page > pages ,
146+ IReadOnlyList < Page > pages ,
147147 Func < Page , FailureCount > ? previousFailureCountSelector = null ,
148148 CancellationToken stoppingToken = default )
149149 {
0 commit comments