2021-07-18 09:44:23 -07:00
|
|
|
|
using System.Collections.Concurrent;
|
|
|
|
|
|
using System.Collections.Generic;
|
2021-07-17 21:17:45 -07:00
|
|
|
|
using System.IO;
|
2022-05-01 17:41:50 -07:00
|
|
|
|
using BurnOutSharp.Interfaces;
|
2021-07-17 21:17:45 -07:00
|
|
|
|
using BurnOutSharp.Matching;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BurnOutSharp.ProtectionType
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// This protection needs far more research
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
public class TivolaRingProtection : IPathCheck
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <inheritdoc/>
|
2021-07-18 09:44:23 -07:00
|
|
|
|
public ConcurrentQueue<string> CheckDirectoryPath(string path, IEnumerable<string> files)
|
2021-07-17 21:17:45 -07:00
|
|
|
|
{
|
|
|
|
|
|
var matchers = new List<PathMatchSet>
|
|
|
|
|
|
{
|
2021-07-17 22:31:29 -07:00
|
|
|
|
new PathMatchSet(Path.Combine("ZDAT", "webmast.dxx").Replace("\\", "/"), "Tivola Ring Protection [Check disc for physical ring]"),
|
2021-07-17 21:17:45 -07:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return MatchUtil.GetAllMatches(files, matchers, any: true);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
public string CheckFilePath(string path)
|
|
|
|
|
|
{
|
|
|
|
|
|
var matchers = new List<PathMatchSet>
|
|
|
|
|
|
{
|
2021-07-17 22:31:29 -07:00
|
|
|
|
new PathMatchSet(Path.Combine("ZDAT", "webmast.dxx").Replace("\\", "/"), "Tivola Ring Protection [Check disc for physical ring]"),
|
2021-07-17 21:17:45 -07:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return MatchUtil.GetFirstMatch(path, matchers, any: true);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|