public void CreateCopy(string text) { var _ = new AppDataFile(CompanyName, CopiesSubFolder, $"{Path.GetFileNameWithoutExtension(FileName)}_{DateTime.Now:MM_dd_yyyy_hh_mm_ss_tt}{Path.GetExtension(FileName)}") { FileData = text }; new AppDataFolder(CompanyName, CopiesSubFolder) .Files .OrderByDescending(File.GetLastWriteTimeUtc) .Skip(MaxCopiesCount) .AsParallel() .ForAll(File.Delete); }
public CommandsHistory(string companyName) { CompanyName = companyName; AppDataFile = new AppDataFile(CompanyName, FileName); }
public CommandsStorage(string companyName, int maxCopiesCount = 50) { CompanyName = companyName; MaxCopiesCount = maxCopiesCount; AppDataFile = new AppDataFile(CompanyName, FileName); }