Use nullable

This commit is contained in:
Alexey Golub
2019-11-13 19:19:36 +02:00
parent 1bf9d9e2e2
commit e5a2852165
42 changed files with 195 additions and 196 deletions

View File

@@ -3,7 +3,6 @@ using System.IO;
using System.Linq;
using System.Text;
using DiscordChatExporter.Core.Models;
using Tyrrrz.Extensions;
namespace DiscordChatExporter.Core.Services.Helpers
{
@@ -12,7 +11,7 @@ namespace DiscordChatExporter.Core.Services.Helpers
public static bool IsDirectoryPath(string path) =>
path.Last() == Path.DirectorySeparatorChar ||
path.Last() == Path.AltDirectorySeparatorChar ||
Path.GetExtension(path).IsNullOrWhiteSpace() && !File.Exists(path);
string.IsNullOrWhiteSpace(Path.GetExtension(path)) && !File.Exists(path);
public static string GetDefaultExportFileName(ExportFormat format, Guild guild, Channel channel,
DateTimeOffset? after = null, DateTimeOffset? before = null)