Dependency Injection Style
AOT Compiling Switched to Secret from Development json file Added Kanbn Humanizer HelperCreateNoteFiles.CleanExistingFiles HelperPackageFilesByDate Added SRP Helper Hardcoded File Search and Sort Set Date from Zip Entry
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
using Serilog;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Text;
|
||||
|
||||
namespace File_Folder_Helper.Helpers;
|
||||
@ -48,9 +48,9 @@ internal static class HelperSaveOrCopyContents
|
||||
default:
|
||||
throw new Exception();
|
||||
}
|
||||
log.Information("D) Directory, F) File or B) Both?");
|
||||
log.LogInformation("D) Directory, F) File or B) Both?");
|
||||
ConsoleKey dfb = Console.ReadKey().Key;
|
||||
log.Information(string.Empty);
|
||||
log.LogInformation(string.Empty);
|
||||
if (dfb is not ConsoleKey.D and not ConsoleKey.F and not ConsoleKey.B)
|
||||
throw new Exception("Not valid");
|
||||
else
|
||||
@ -160,25 +160,25 @@ internal static class HelperSaveOrCopyContents
|
||||
throw new Exception();
|
||||
}
|
||||
TimeSpan timeSpan = new(DateTime.Now.Ticks - now);
|
||||
log.Information(string.Concat(timeSpan.TotalSeconds, " TotalSeconds"));
|
||||
log.LogInformation(string.Concat(timeSpan.TotalSeconds, " TotalSeconds"));
|
||||
if (alongSideTopDirectoryOnly)
|
||||
{
|
||||
File.WriteAllText(filePathAndName, data.ToString());
|
||||
log.Information("Data written");
|
||||
log.LogInformation("Data written");
|
||||
}
|
||||
else if (clipboardTopDirectoryOnly)
|
||||
{
|
||||
TextCopy.ClipboardService.SetText(data.ToString());
|
||||
log.Information("Data stored in clipboard");
|
||||
log.LogInformation("Data stored in clipboard");
|
||||
}
|
||||
else if (alongSideAllDirectories)
|
||||
{
|
||||
File.AppendAllText(filePathAndName, "Done");
|
||||
log.Information("Data written");
|
||||
log.LogInformation("Data written");
|
||||
}
|
||||
else
|
||||
throw new Exception();
|
||||
log.Information("Press any key to close");
|
||||
log.LogInformation("Press any key to close");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user