diff --git a/BurnOutSharp/FileProtection.cs b/BurnOutSharp/ProtectionProgress.cs
similarity index 73%
rename from BurnOutSharp/FileProtection.cs
rename to BurnOutSharp/ProtectionProgress.cs
index 63311b89..163d2d0a 100644
--- a/BurnOutSharp/FileProtection.cs
+++ b/BurnOutSharp/ProtectionProgress.cs
@@ -1,12 +1,12 @@
namespace BurnOutSharp
{
- public class FileProtection
+ public class ProtectionProgress
{
public string Filename { get; private set; }
public float Percentage { get; private set; }
public string Protection { get; private set; }
- public FileProtection(string filename, float percentage, string protection)
+ public ProtectionProgress(string filename, float percentage, string protection)
{
this.Filename = filename;
this.Percentage = percentage;
diff --git a/BurnOutSharp/Scanner.cs b/BurnOutSharp/Scanner.cs
index 9d9cd125..48e7412c 100644
--- a/BurnOutSharp/Scanner.cs
+++ b/BurnOutSharp/Scanner.cs
@@ -12,7 +12,7 @@ namespace BurnOutSharp
///
/// Optional progress callback during scanning
///
- public IProgress FileProgress { get; set; } = null;
+ public IProgress FileProgress { get; set; } = null;
///
/// Determines whether the byte position of found protection is included or not
@@ -38,7 +38,7 @@ namespace BurnOutSharp
/// Constructor
///
/// Optional progress callback
- public Scanner(IProgress fileProgress = null)
+ public Scanner(IProgress fileProgress = null)
{
FileProgress = fileProgress;
}
@@ -64,7 +64,7 @@ namespace BurnOutSharp
return null;
// Checkpoint
- FileProgress?.Report(new FileProtection(null, 0, null));
+ FileProgress?.Report(new ProtectionProgress(null, 0, null));
// Temp variables for reporting
string tempFilePath = Path.GetTempPath();
@@ -96,7 +96,7 @@ namespace BurnOutSharp
reportableFileName = reportableFileName.Substring(tempFilePathWithGuid.Length);
// Checkpoint
- FileProgress?.Report(new FileProtection(reportableFileName, i / (float)files.Count(), "Checking file" + (file != reportableFileName ? " from archive" : string.Empty)));
+ FileProgress?.Report(new ProtectionProgress(reportableFileName, i / (float)files.Count(), "Checking file" + (file != reportableFileName ? " from archive" : string.Empty)));
// Scan for path-detectable protections
var filePathProtections = GetPathProtections(file);
@@ -118,7 +118,7 @@ namespace BurnOutSharp
// Checkpoint
protections.TryGetValue(file, out List fullProtectionList);
string fullProtection = (fullProtectionList != null && fullProtectionList.Any() ? string.Join(", ", fullProtectionList) : null);
- FileProgress?.Report(new FileProtection(reportableFileName, (i + 1) / (float)files.Count(), fullProtection ?? string.Empty));
+ FileProgress?.Report(new ProtectionProgress(reportableFileName, (i + 1) / (float)files.Count(), fullProtection ?? string.Empty));
}
}
@@ -131,7 +131,7 @@ namespace BurnOutSharp
reportableFileName = reportableFileName.Substring(tempFilePathWithGuid.Length);
// Checkpoint
- FileProgress?.Report(new FileProtection(reportableFileName, 0, "Checking file" + (path != reportableFileName ? " from archive" : string.Empty)));
+ FileProgress?.Report(new ProtectionProgress(reportableFileName, 0, "Checking file" + (path != reportableFileName ? " from archive" : string.Empty)));
// Scan for path-detectable protections
var filePathProtections = GetPathProtections(path);
@@ -153,7 +153,7 @@ namespace BurnOutSharp
// Checkpoint
protections.TryGetValue(path, out List fullProtectionList);
string fullProtection = (fullProtectionList != null && fullProtectionList.Any() ? string.Join(", ", fullProtectionList) : null);
- FileProgress?.Report(new FileProtection(reportableFileName, 1, fullProtection ?? string.Empty));
+ FileProgress?.Report(new ProtectionProgress(reportableFileName, 1, fullProtection ?? string.Empty));
}
// Throw on an invalid path
diff --git a/Test/Program.cs b/Test/Program.cs
index 5ea882f6..4d2b8775 100644
--- a/Test/Program.cs
+++ b/Test/Program.cs
@@ -10,7 +10,7 @@ namespace Test
static void Main(string[] args)
{
// Create progress indicator
- var p = new Progress();
+ var p = new Progress();
p.ProgressChanged += Changed;
// Create scanner to be shared
@@ -51,7 +51,7 @@ namespace Test
Console.ReadLine();
}
- private static void Changed(object source, FileProtection value)
+ private static void Changed(object source, ProtectionProgress value)
{
Console.WriteLine($"{value.Percentage * 100:N2}%: {value.Filename} - {value.Protection}");
}