ActionBlock replaced with ITargetBlock in contracts

master
Inga 🏳‍🌈 7 years ago
parent 9884fb963e
commit ffcae2cbce
  1. 4
      Source/ReportStorage/Contracts/IReportInfo.cs
  2. 2
      Source/ReportStorage/Contracts/IReportStorage.cs
  3. 4
      Source/ReportStorage/InMemoryReportStorage/ReportInfo.cs
  4. 2
      Source/ReportStorage/InMemoryReportStorage/ReportStorage.cs
  5. 2
      Source/SourceStorage/Contracts/ISourceDirectory.cs
  6. 2
      Source/SourceStorage/Contracts/ISourceStorage.cs
  7. 2
      Source/SourceStorage/InMemorySourceStorage/SourceDirectory.cs
  8. 2
      Source/SourceStorage/InMemorySourceStorage/SourceStorage.cs
  9. 2
      Source/TargetMetadataStorage/Contracts/ITargetDirectory.cs
  10. 2
      Source/TargetMetadataStorage/Contracts/ITargetFile.cs
  11. 4
      Source/TargetMetadataStorage/Contracts/ITargetMetadataStorageForRecovery.cs
  12. 4
      Source/TargetMetadataStorage/InMemoryMetadataStorage/MetadataStorage.cs
  13. 2
      Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetDirectory.cs
  14. 2
      Source/TargetMetadataStorage/InMemoryMetadataStorage/TargetFile.cs

@ -17,8 +17,8 @@
bool HasErrors { get; }
Task GetAllErrors(ActionBlock<string> actionBlock, CancellationToken ct);
Task GetAllErrors(ITargetBlock<string> actionBlock, CancellationToken ct);
Task GetAllFiles(ActionBlock<IFileInfo> actionBlock, CancellationToken ct);
Task GetAllFiles(ITargetBlock<IFileInfo> actionBlock, CancellationToken ct);
}
}

@ -14,6 +14,6 @@
Task AddFileInfo(string reportId, string directoryPath, string fileName, string hash, long size);
Task GetAllReports(ActionBlock<IReportInfo> actionBlock, bool includeEmpty, CancellationToken ct);
Task GetAllReports(ITargetBlock<IReportInfo> actionBlock, bool includeEmpty, CancellationToken ct);
}
}

@ -28,7 +28,7 @@
private List<IFileInfo> Files { get; } = new List<IFileInfo>();
public Task GetAllErrors(ActionBlock<string> actionBlock, CancellationToken ct)
public Task GetAllErrors(ITargetBlock<string> actionBlock, CancellationToken ct)
{
return Task.Run(() =>
{
@ -46,7 +46,7 @@
});
}
public Task GetAllFiles(ActionBlock<IFileInfo> actionBlock, CancellationToken ct)
public Task GetAllFiles(ITargetBlock<IFileInfo> actionBlock, CancellationToken ct)
{
return Task.Run(() =>
{

@ -26,7 +26,7 @@
return Task.Run(() => this.Reports[reportId].Complete(isEmpty, hasErrors));
}
public Task GetAllReports(ActionBlock<IReportInfo> actionBlock, bool includeEmpty, CancellationToken ct)
public Task GetAllReports(ITargetBlock<IReportInfo> actionBlock, bool includeEmpty, CancellationToken ct)
{
return Task.Run(() =>
{

@ -10,6 +10,6 @@
Task<ISourceFile> GetFile(string filename);
Task GetAllFiles(ActionBlock<ISourceFile> actionBlock, CancellationToken ct);
Task GetAllFiles(ITargetBlock<ISourceFile> actionBlock, CancellationToken ct);
}
}

@ -8,6 +8,6 @@
{
Task<ISourceDirectory> GetDirectory(string normalizedRelativePath);
Task GetAllDirectories(ActionBlock<ISourceDirectory> actionBlock, CancellationToken ct);
Task GetAllDirectories(ITargetBlock<ISourceDirectory> actionBlock, CancellationToken ct);
}
}

@ -18,7 +18,7 @@
private ImmutableDictionary<string, byte[]> StorageData { get; }
public Task GetAllFiles(ActionBlock<ISourceFile> actionBlock, CancellationToken ct)
public Task GetAllFiles(ITargetBlock<ISourceFile> actionBlock, CancellationToken ct)
{
return Task.Run(() =>
{

@ -16,7 +16,7 @@
private ImmutableDictionary<string, ImmutableDictionary<string, byte[]>> StorageData { get; }
public Task GetAllDirectories(ActionBlock<ISourceDirectory> actionBlock, CancellationToken ct)
public Task GetAllDirectories(ITargetBlock<ISourceDirectory> actionBlock, CancellationToken ct)
{
return Task.Run(() =>
{

@ -10,6 +10,6 @@
Task UploadFile(string filename, string originalHash, long originalSize);
Task GetAllLatestFileVersions(ActionBlock<ITargetFileVersion> actionBlock, CancellationToken ct);
Task GetAllLatestFileVersions(ITargetBlock<ITargetFileVersion> actionBlock, CancellationToken ct);
}
}

@ -6,6 +6,6 @@
public interface ITargetFile
{
Task GetAllVersions(ActionBlock<ITargetFileVersion> actionBlock, CancellationToken ct);
Task GetAllVersions(ITargetBlock<ITargetFileVersion> actionBlock, CancellationToken ct);
}
}

@ -6,10 +6,10 @@
public interface ITargetMetadataStorageForRecovery : ITargetMetadataStorage
{
Task GetAllDirectories(ActionBlock<ITargetDirectory> actionBlock, CancellationToken ct);
Task GetAllDirectories(ITargetBlock<ITargetDirectory> actionBlock, CancellationToken ct);
Task<ITargetFile> GetFile(string normalizedRelativeDirectoryPath, string filename);
Task GetBlobUsages(string hash, ActionBlock<ITargetFileVersion> actionBlock, CancellationToken ct);
Task GetBlobUsages(string hash, ITargetBlock<ITargetFileVersion> actionBlock, CancellationToken ct);
}
}

@ -13,7 +13,7 @@
private Dictionary<string, List<ITargetFileVersion>> BlobsInfo { get; } = new Dictionary<string, List<ITargetFileVersion>>();
public Task GetAllDirectories(ActionBlock<ITargetDirectory> actionBlock, CancellationToken ct)
public Task GetAllDirectories(ITargetBlock<ITargetDirectory> actionBlock, CancellationToken ct)
{
return Task.Run(() =>
{
@ -31,7 +31,7 @@
});
}
public Task GetBlobUsages(string hash, ActionBlock<ITargetFileVersion> actionBlock, CancellationToken ct)
public Task GetBlobUsages(string hash, ITargetBlock<ITargetFileVersion> actionBlock, CancellationToken ct)
{
return Task.Run(() =>
{

@ -23,7 +23,7 @@
private Dictionary<string, List<ITargetFileVersion>> Files { get; }
public Task GetAllLatestFileVersions(ActionBlock<ITargetFileVersion> actionBlock, CancellationToken ct)
public Task GetAllLatestFileVersions(ITargetBlock<ITargetFileVersion> actionBlock, CancellationToken ct)
{
return Task.Run(() =>
{

@ -15,7 +15,7 @@
private List<ITargetFileVersion> Versions { get; }
public Task GetAllVersions(ActionBlock<ITargetFileVersion> actionBlock, CancellationToken ct)
public Task GetAllVersions(ITargetBlock<ITargetFileVersion> actionBlock, CancellationToken ct)
{
return Task.Run(() =>
{

Loading…
Cancel
Save