mirror of
https://github.com/Tribufu/ServerManagers
synced 2026-08-09 20:51:05 +00:00
Changed the discord bot to be case insensitive.
Added IsEmpty and HasOne IEnumerable Extensions.
This commit is contained in:
parent
734332f10c
commit
dd431e93b2
20 changed files with 383 additions and 107 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Ionic.Zip;
|
||||
using ServerManagerTool.Common.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
|
@ -73,7 +74,8 @@ namespace ServerManagerTool.Common.Utils
|
|||
{
|
||||
if (string.IsNullOrWhiteSpace(zipFile))
|
||||
throw new ArgumentNullException(nameof(zipFile));
|
||||
if (!filesToZip.Any())
|
||||
|
||||
if (filesToZip is null || filesToZip.IsEmpty())
|
||||
return;
|
||||
|
||||
if (!File.Exists(zipFile))
|
||||
|
|
@ -165,7 +167,8 @@ namespace ServerManagerTool.Common.Utils
|
|||
{
|
||||
if (string.IsNullOrWhiteSpace(zipFile))
|
||||
throw new ArgumentNullException(nameof(zipFile));
|
||||
if (!filesToZip.Any())
|
||||
|
||||
if (filesToZip is null || filesToZip.IsEmpty())
|
||||
throw new ArgumentNullException(nameof(filesToZip));
|
||||
|
||||
using (var zip = new ZipFile(zipFile))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue