Refactor using c# 12 features

This commit is contained in:
Tyrrrz
2023-12-10 22:32:45 +02:00
parent 174b92cbb0
commit 619fe9ccf7
30 changed files with 155 additions and 290 deletions

View File

@@ -5,11 +5,9 @@ using PathEx = System.IO.Path;
namespace DiscordChatExporter.Cli.Tests.Utils;
internal partial class TempDir : IDisposable
internal partial class TempDir(string path) : IDisposable
{
public string Path { get; }
public TempDir(string path) => Path = path;
public string Path { get; } = path;
public void Dispose()
{

View File

@@ -5,11 +5,9 @@ using PathEx = System.IO.Path;
namespace DiscordChatExporter.Cli.Tests.Utils;
internal partial class TempFile : IDisposable
internal partial class TempFile(string path) : IDisposable
{
public string Path { get; }
public TempFile(string path) => Path = path;
public string Path { get; } = path;
public void Dispose()
{