Refactor confused format detection method names
Some checks are pending
MSBuild / build (push) Waiting to run
MSBuild / publish (push) Blocked by required conditions

This commit is contained in:
ema
2025-07-09 04:27:50 +08:00
parent 345b061a8d
commit 0bb6e622f6
2 changed files with 4 additions and 4 deletions

View File

@@ -33,13 +33,13 @@ public class FormatDetector
//new DockerfileDetector(),
];
public static IConfusedFormatDetector ResolveConfusedFormat(string path, string text)
public static IFormatDetector Confuse(string path, string text)
{
if (string.IsNullOrWhiteSpace(text)) return null;
return Instance.TextDetectors
.Where(detector => detector is IConfusedFormatDetector && detector.Detect(path, text))
.FirstOrDefault() as IConfusedFormatDetector;
.FirstOrDefault();
}
public static IFormatDetector Detect(string path, string text)