mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add validation to hash type array
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@@ -54,6 +55,9 @@ namespace SabreTools.DatTools
|
|||||||
|
|
||||||
public DatFromDir(HashType[] hashes, SkipFileType skipFileType, bool addBlanks)
|
public DatFromDir(HashType[] hashes, SkipFileType skipFileType, bool addBlanks)
|
||||||
{
|
{
|
||||||
|
if (hashes.Length == 0)
|
||||||
|
throw new ArgumentException($"{nameof(hashes)} must contain at least one valid HashType");
|
||||||
|
|
||||||
_hashes = hashes;
|
_hashes = hashes;
|
||||||
_skipFileType = skipFileType;
|
_skipFileType = skipFileType;
|
||||||
_addBlanks = addBlanks;
|
_addBlanks = addBlanks;
|
||||||
|
|||||||
Reference in New Issue
Block a user