From ffcae2cbce9fae99a9918f934eb2484640622560 Mon Sep 17 00:00:00 2001 From: Inga Lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Fri, 21 Jul 2017 16:40:24 +0300 Subject: [PATCH] ActionBlock replaced with ITargetBlock in contracts --- Source/ReportStorage/Contracts/IReportInfo.cs | 4 ++-- Source/ReportStorage/Contracts/IReportStorage.cs | 2 +- Source/ReportStorage/InMemoryReportStorage/ReportInfo.cs | 4 ++-- Source/ReportStorage/InMemoryReportStorage/ReportStorage.cs | 2 +- Source/SourceStorage/Contracts/ISourceDirectory.cs | 2 +- Source/SourceStorage/Contracts/ISourceStorage.cs | 2 +- Source/SourceStorage/InMemorySourceStorage/SourceDirectory.cs | 2 +- Source/SourceStorage/InMemorySourceStorage/SourceStorage.cs | 2 +- Source/TargetMetadataStorage/Contracts/ITargetDirectory.cs | 2 +- Source/TargetMetadataStorage/Contracts/ITargetFile.cs | 2 +- .../Contracts/ITargetMetadataStorageForRecovery.cs | 4 ++-- .../InMemoryMetadataStorage/MetadataStorage.cs | 4 ++-- .../InMemoryMetadataStorage/TargetDirectory.cs | 2 +- .../InMemoryMetadataStorage/TargetFile.cs | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Source/ReportStorage/Contracts/IReportInfo.cs b/Source/ReportStorage/Contracts/IReportInfo.cs index 978050f..8e91877 100644 --- a/Source/ReportStorage/Contracts/IReportInfo.cs +++ b/Source/ReportStorage/Contracts/IReportInfo.cs @@ -17,8 +17,8 @@ bool HasErrors { get; } - Task GetAllErrors(ActionBlock actionBlock, CancellationToken ct); + Task GetAllErrors(ITargetBlock actionBlock, CancellationToken ct); - Task GetAllFiles(ActionBlock actionBlock, CancellationToken ct); + Task GetAllFiles(ITargetBlock actionBlock, CancellationToken ct); } } diff --git a/Source/ReportStorage/Contracts/IReportStorage.cs b/Source/ReportStorage/Contracts/IReportStorage.cs index 0448fdf..c7c9c17 100644 --- a/Source/ReportStorage/Contracts/IReportStorage.cs +++ b/Source/ReportStorage/Contracts/IReportStorage.cs @@ -14,6 +14,6 @@ Task AddFileInfo(string reportId, string directoryPath, string fileName, string hash, long size); - Task GetAllReports(ActionBlock actionBlock, bool includeEmpty, CancellationToken ct); + Task GetAllReports(ITargetBlock actionBlock, bool includeEmpty, CancellationToken ct); } } diff --git a/Source/ReportStorage/InMemoryReportStorage/ReportInfo.cs b/Source/ReportStorage/InMemoryReportStorage/ReportInfo.cs index 7a00dea..3a4ca23 100644 --- a/Source/ReportStorage/InMemoryReportStorage/ReportInfo.cs +++ b/Source/ReportStorage/InMemoryReportStorage/ReportInfo.cs @@ -28,7 +28,7 @@ private List Files { get; } = new List(); - public Task GetAllErrors(ActionBlock actionBlock, CancellationToken ct) + public Task GetAllErrors(ITargetBlock actionBlock, CancellationToken ct) { return Task.Run(() => { @@ -46,7 +46,7 @@ }); } - public Task GetAllFiles(ActionBlock actionBlock, CancellationToken ct) + public Task GetAllFiles(ITargetBlock actionBlock, CancellationToken ct) { return Task.Run(() => { diff --git a/Source/ReportStorage/InMemoryReportStorage/ReportStorage.cs b/Source/ReportStorage/InMemoryReportStorage/ReportStorage.cs index ed5db5b..9b8a4fb 100644 --- a/Source/ReportStorage/InMemoryReportStorage/ReportStorage.cs +++ b/Source/ReportStorage/InMemoryReportStorage/ReportStorage.cs @@ -26,7 +26,7 @@ return Task.Run(() => this.Reports[reportId].Complete(isEmpty, hasErrors)); } - public Task GetAllReports(ActionBlock actionBlock, bool includeEmpty, CancellationToken ct) + public Task GetAllReports(ITargetBlock actionBlock, bool includeEmpty, CancellationToken ct) { return Task.Run(() => { diff --git a/Source/SourceStorage/Contracts/ISourceDirectory.cs b/Source/SourceStorage/Contracts/ISourceDirectory.cs index 63e7cc1..8969307 100644 --- a/Source/SourceStorage/Contracts/ISourceDirectory.cs +++ b/Source/SourceStorage/Contracts/ISourceDirectory.cs @@ -10,6 +10,6 @@ Task GetFile(string filename); - Task GetAllFiles(ActionBlock actionBlock, CancellationToken ct); + Task GetAllFiles(ITargetBlock actionBlock, CancellationToken ct); } } diff --git a/Source/SourceStorage/Contracts/ISourceStorage.cs b/Source/SourceStorage/Contracts/ISourceStorage.cs index 94fc536..ec2ddce 100644 --- a/Source/SourceStorage/Contracts/ISourceStorage.cs +++ b/Source/SourceStorage/Contracts/ISourceStorage.cs @@ -8,6 +8,6 @@ { Task GetDirectory(string normalizedRelativePath); - Task GetAllDirectories(ActionBlock actionBlock, CancellationToken ct); + Task GetAllDirectories(ITargetBlock actionBlock, CancellationToken ct); } } diff --git a/Source/SourceStorage/InMemorySourceStorage/SourceDirectory.cs b/Source/SourceStorage/InMemorySourceStorage/SourceDirectory.cs index 8c617bb..7777d71 100644 --- a/Source/SourceStorage/InMemorySourceStorage/SourceDirectory.cs +++ b/Source/SourceStorage/InMemorySourceStorage/SourceDirectory.cs @@ -18,7 +18,7 @@ private ImmutableDictionary StorageData { get; } - public Task GetAllFiles(ActionBlock actionBlock, CancellationToken ct) + public Task GetAllFiles(ITargetBlock actionBlock, CancellationToken ct) { return Task.Run(() => { diff --git a/Source/SourceStorage/InMemorySourceStorage/SourceStorage.cs b/Source/SourceStorage/InMemorySourceStorage/SourceStorage.cs index f6e2660..80f39e9 100644 --- a/Source/SourceStorage/InMemorySourceStorage/SourceStorage.cs +++ b/Source/SourceStorage/InMemorySourceStorage/SourceStorage.cs @@ -16,7 +16,7 @@ private ImmutableDictionary> StorageData { get; } - public Task GetAllDirectories(ActionBlock actionBlock, CancellationToken ct) + public Task GetAllDirectories(ITargetBlock actionBlock, CancellationToken ct) { return Task.Run(() => { diff --git a/Source/TargetMetadataStorage/Contracts/ITargetDirectory.cs b/Source/TargetMetadataStorage/Contracts/ITargetDirectory.cs index 1e9a2cd..ab647d0 100644 --- a/Source/TargetMetadataStorage/Contracts/ITargetDirectory.cs +++ b/Source/TargetMetadataStorage/Contracts/ITargetDirectory.cs @@ -10,6 +10,6 @@ Task UploadFile(string filename, string originalHash, long originalSize); - Task GetAllLatestFileVersions(ActionBlock actionBlock, CancellationToken ct); + Task GetAllLatestFileVersions(ITargetBlock actionBlock, CancellationToken ct); } } diff --git a/Source/TargetMetadataStorage/Contracts/ITargetFile.cs b/Source/TargetMetadataStorage/Contracts/ITargetFile.cs index 435b9e7..51cc3f6 100644 --- a/Source/TargetMetadataStorage/Contracts/ITargetFile.cs +++ b/Source/TargetMetadataStorage/Contracts/ITargetFile.cs @@ -6,6 +6,6 @@ public interface ITargetFile { - Task GetAllVersions(ActionBlock actionBlock, CancellationToken ct); + Task GetAllVersions(ITargetBlock actionBlock, CancellationToken ct); } } diff --git a/Source/TargetMetadataStorage/Contracts/ITargetMetadataStorageForRecovery.cs b/Source/TargetMetadataStorage/Contracts/ITargetMetadataStorageForRecovery.cs index 038c200..f3dfef4 100644 --- a/Source/TargetMetadataStorage/Contracts/ITargetMetadataStorageForRecovery.cs +++ b/Source/TargetMetadataStorage/Contracts/ITargetMetadataStorageForRecovery.cs @@ -6,10 +6,10 @@ public interface ITargetMetadataStorageForRecovery : ITargetMetadataStorage { - Task GetAllDirectories(ActionBlock actionBlock, CancellationToken ct); + Task GetAllDirectories(ITargetBlock actionBlock, CancellationToken ct); Task GetFile(string normalizedRelativeDirectoryPath, string filename); - Task GetBlobUsages(string hash, ActionBlock actionBlock, CancellationToken ct); + Task GetBlobUsages(string hash, ITargetBlock actionBlock, CancellationToken ct); } } diff --git a/Source/TargetMetadataStorage/InMemoryMetadataStorage/MetadataStorage.cs b/Source/TargetMetadataStorage/InMemoryMetadataStorage/MetadataStorage.cs index 1824e9f..a9b663b 100644 --- a/Source/TargetMetadataStorage/InMemoryMetadataStorage/MetadataStorage.cs +++ b/Source/TargetMetadataStorage/InMemoryMetadataStorage/MetadataStorage.cs @@ -13,7 +13,7 @@ private Dictionary> BlobsInfo { get; } = new Dictionary>(); - public Task GetAllDirectories(ActionBlock actionBlock, CancellationToken ct) + public Task GetAllDirectories(ITargetBlock actionBlock, CancellationToken ct) { return Task.Run(() => { @@ -31,7 +31,7 @@ }); } - public Task GetBlobUsages(string hash, ActionBlock actionBlock, CancellationToken ct) + public Task GetBlobUsages(string hash, ITargetBlock actionBlock, CancellationToken ct) { return Task.Run(() => { diff --git a/Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetDirectory.cs b/Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetDirectory.cs index 67dceec..9357485 100644 --- a/Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetDirectory.cs +++ b/Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetDirectory.cs @@ -23,7 +23,7 @@ private Dictionary> Files { get; } - public Task GetAllLatestFileVersions(ActionBlock actionBlock, CancellationToken ct) + public Task GetAllLatestFileVersions(ITargetBlock actionBlock, CancellationToken ct) { return Task.Run(() => { diff --git a/Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetFile.cs b/Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetFile.cs index ea0c48a..61fa06d 100644 --- a/Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetFile.cs +++ b/Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetFile.cs @@ -15,7 +15,7 @@ private List Versions { get; } - public Task GetAllVersions(ActionBlock actionBlock, CancellationToken ct) + public Task GetAllVersions(ITargetBlock actionBlock, CancellationToken ct) { return Task.Run(() => {