diff --git a/c#/crawler/src/Db/LatestReplier.cs b/c#/crawler/src/Db/LatestReplier.cs index 0d689491..61f3a522 100644 --- a/c#/crawler/src/Db/LatestReplier.cs +++ b/c#/crawler/src/Db/LatestReplier.cs @@ -1,4 +1,5 @@ -namespace tbm.Crawler.Db; +// ReSharper disable PropertyCanBeMadeInitOnly.Global +namespace tbm.Crawler.Db; public class LatestReplier : BaseUser { diff --git a/c#/crawler/src/Tieba/Crawl/Saver/Post/SubReplySaver.cs b/c#/crawler/src/Tieba/Crawl/Saver/Post/SubReplySaver.cs index 6116b6db..aad130a1 100644 --- a/c#/crawler/src/Tieba/Crawl/Saver/Post/SubReplySaver.cs +++ b/c#/crawler/src/Tieba/Crawl/Saver/Post/SubReplySaver.cs @@ -30,7 +30,7 @@ protected override Lazy> _addSplitRevisionsDelegatesKeyByEntityType ??= new(() => new() { {typeof(SubReplyRevision.SplitAgreeCount), AddRevisionsWithDuplicateIndex}, - {typeof(SubReplyRevision.SplitDisagreeCount), AddRevisionsWithDuplicateIndex}, + {typeof(SubReplyRevision.SplitDisagreeCount), AddRevisionsWithDuplicateIndex} }); protected override Spid RevisionIdSelector(BaseSubReplyRevision entity) => entity.Spid; diff --git a/c#/crawler/src/Tieba/Crawl/Saver/SaverWithRevision.cs b/c#/crawler/src/Tieba/Crawl/Saver/SaverWithRevision.cs index 80b233a0..edc7f964 100644 --- a/c#/crawler/src/Tieba/Crawl/Saver/SaverWithRevision.cs +++ b/c#/crawler/src/Tieba/Crawl/Saver/SaverWithRevision.cs @@ -1,5 +1,3 @@ -using Microsoft.EntityFrameworkCore.ChangeTracking; - namespace tbm.Crawler.Tieba.Crawl.Saver; public abstract partial class SaverWithRevision( diff --git a/c#/crawler/src/Tieba/Crawl/Saver/UserSaver.cs b/c#/crawler/src/Tieba/Crawl/Saver/UserSaver.cs index 1d4662ff..bf8914ff 100644 --- a/c#/crawler/src/Tieba/Crawl/Saver/UserSaver.cs +++ b/c#/crawler/src/Tieba/Crawl/Saver/UserSaver.cs @@ -1,5 +1,3 @@ -using Microsoft.EntityFrameworkCore.ChangeTracking; - namespace tbm.Crawler.Tieba.Crawl.Saver; public partial class UserSaver( @@ -43,9 +41,6 @@ where newlyLocked.Contains(user.Uid) userFieldRevisionIgnorance); } - public IEnumerable AcquireUidLocksForSave(IEnumerable usersId) => - _saverLocks.Value.Acquire(usersId.ToList()); - public void OnPostSave() => _saverLocks.Value.Dispose(); } public partial class UserSaver diff --git a/c#/crawler/src/Worker/ProcessImagesInAllReplyContentsWorker.cs b/c#/crawler/src/Worker/ProcessImagesInAllReplyContentsWorker.cs index 220ae72d..748bc63c 100644 --- a/c#/crawler/src/Worker/ProcessImagesInAllReplyContentsWorker.cs +++ b/c#/crawler/src/Worker/ProcessImagesInAllReplyContentsWorker.cs @@ -1,5 +1,6 @@ namespace tbm.Crawler.Worker; +// ReSharper disable once UnusedType.Global public class ProcessImagesInAllReplyContentsWorker( ILogger logger, IConfiguration config, diff --git a/c#/crawler/src/Worker/RetryCrawlWorker.cs b/c#/crawler/src/Worker/RetryCrawlWorker.cs index 329d4012..73f51079 100644 --- a/c#/crawler/src/Worker/RetryCrawlWorker.cs +++ b/c#/crawler/src/Worker/RetryCrawlWorker.cs @@ -37,6 +37,7 @@ protected override async Task DoWork(CancellationToken stoppingToken) var pages = failureCountsKeyByPage.Keys.ToList(); FailureCount FailureCountSelector(Page p) => failureCountsKeyByPage[p]; + // ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault switch (lockType) { case CrawlerLocks.Type.Thread: diff --git a/c#/imagePipeline/src/Db/ImageWithFrameIndex.cs b/c#/imagePipeline/src/Db/ImageWithFrameIndex.cs index 61ebf29b..997dec10 100644 --- a/c#/imagePipeline/src/Db/ImageWithFrameIndex.cs +++ b/c#/imagePipeline/src/Db/ImageWithFrameIndex.cs @@ -1,3 +1,4 @@ +// ReSharper disable PropertyCanBeMadeInitOnly.Global namespace tbm.ImagePipeline.Db; public abstract class ImageWithFrameIndex : EntityWithImageId diff --git a/c#/shared/src/Db/EntityWithImageId.cs b/c#/shared/src/Db/EntityWithImageId.cs index b3f0c3cb..fb2f718f 100644 --- a/c#/shared/src/Db/EntityWithImageId.cs +++ b/c#/shared/src/Db/EntityWithImageId.cs @@ -1,3 +1,4 @@ +// ReSharper disable PropertyCanBeMadeInitOnly.Global using System.ComponentModel.DataAnnotations; namespace tbm.Shared.Db; diff --git a/c#/shared/src/Db/RowVersionedEntity.cs b/c#/shared/src/Db/RowVersionedEntity.cs index adcd4669..11e8e90a 100644 --- a/c#/shared/src/Db/RowVersionedEntity.cs +++ b/c#/shared/src/Db/RowVersionedEntity.cs @@ -1,3 +1,4 @@ +// ReSharper disable PropertyCanBeMadeInitOnly.Global using System.ComponentModel.DataAnnotations; namespace tbm.Shared.Db; diff --git a/c#/shared/src/TransformEntityWorker.cs b/c#/shared/src/TransformEntityWorker.cs index f9f4fe42..1ae77e7b 100644 --- a/c#/shared/src/TransformEntityWorker.cs +++ b/c#/shared/src/TransformEntityWorker.cs @@ -3,7 +3,6 @@ using System.Text.Json; using System.Text.Unicode; using Microsoft.EntityFrameworkCore.ChangeTracking; -using SuperLinq; using tbm.Shared.Db; namespace tbm.Shared; @@ -14,7 +13,7 @@ public abstract class TransformEntityWorker() protected static readonly JsonSerializerOptions JsonSerializerOptions = new() { IncludeFields = true, - Encoder = JavaScriptEncoder.Create(UnicodeRanges.All), + Encoder = JavaScriptEncoder.Create(UnicodeRanges.All) }; }