-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rename method
PostParseHook()
to OnPostParse()
* rename method `BeforeCommitSaveHook()` to `OnBeforeCommitSave()` * rename method `PostCommitSaveHook()` to `OnPostCommitSave()` @ CrawlFacade.cs * rename method `TriggerPostSave()` to `OnPostSave()` @ IPostSaver.cs * rename delegate and prop `PostSaveHook(s)` to `PostSaveHandler(s)` @ PostSaver.cs * rename method `PostSaveHook()` to `OnPostSave()` @ UserSaver.cs @ c#/crawler
- Loading branch information
Showing
11 changed files
with
31 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,18 +11,17 @@ public abstract class PostSaver<TPost, TBaseRevision>( | |
where TPost : BasePost | ||
where TBaseRevision : BaseRevisionWithSplitting | ||
{ | ||
protected delegate void PostSaveHook(); | ||
protected PostSaveHook PostSaveHooks { get; set; } = () => { }; | ||
|
||
public virtual IFieldChangeIgnorance.FieldChangeIgnoranceDelegates | ||
UserFieldChangeIgnorance => throw new NotSupportedException(); | ||
public PostType CurrentPostType { get; } = currentPostType; | ||
protected ConcurrentDictionary<PostId, TPost> Posts { get; } = posts; | ||
protected AuthorRevisionSaver AuthorRevisionSaver { get; } = authorRevisionSaverFactory(currentPostType); | ||
|
||
public void TriggerPostSave() => PostSaveHooks(); | ||
public abstract SaverChangeSet<TPost> Save(CrawlerDbContext db); | ||
public void OnPostSave() => PostSaveHandlers(); | ||
protected PostSaveHandler PostSaveHandlers { get; set; } = () => { }; | ||
Check failure on line 21 in c#/crawler/src/Tieba/Crawl/Saver/Post/PostSaver.cs GitHub Actions / build (crawler)
Check failure on line 21 in c#/crawler/src/Tieba/Crawl/Saver/Post/PostSaver.cs GitHub Actions / build (crawler)
|
||
protected delegate void PostSaveHandler(); | ||
Check failure on line 22 in c#/crawler/src/Tieba/Crawl/Saver/Post/PostSaver.cs GitHub Actions / build (crawler)
Check failure on line 22 in c#/crawler/src/Tieba/Crawl/Saver/Post/PostSaver.cs GitHub Actions / build (crawler)
|
||
|
||
public abstract SaverChangeSet<TPost> Save(CrawlerDbContext db); | ||
protected SaverChangeSet<TPost> Save<TRevision>( | ||
CrawlerDbContext db, | ||
Func<TPost, PostId> postIdSelector, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters