Cleanup and bugfixes; additional notes

This commit is contained in:
Matt Nadareski
2021-09-10 15:32:37 -07:00
parent 1e70d960ba
commit 5344de96b2
67 changed files with 261 additions and 229 deletions

View File

@@ -1,5 +1,6 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BurnOutSharp.Matching;
namespace BurnOutSharp.ProtectionType
@@ -29,7 +30,14 @@ namespace BurnOutSharp.ProtectionType
}
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false) => null;
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var contentMatchSets = GetContentMatchSets();
if (contentMatchSets != null && contentMatchSets.Any())
return MatchUtil.GetFirstMatch(file, fileContent, contentMatchSets, includeDebug);
return null;
}
/// <inheritdoc/>
public ConcurrentQueue<string> CheckDirectoryPath(string path, IEnumerable<string> files)