public FileJsonObject(string filePath) { if (string.IsNullOrEmpty(filePath)) { throw new ArgumentNullException(nameof(filePath)); } _filePath = filePath; var directory = Path.GetDirectoryName(_filePath); DirectoryManager.CreateDirectoryIfNotExists(directory); }
private SmtpClient CreateClientToLocalFolder() { if (string.IsNullOrEmpty(_mailLocalFolder)) { _mailLocalFolder = Path.Combine(Environment.CurrentDirectory, "mails"); } DirectoryManager.CreateDirectoryIfNotExists(_mailLocalFolder); return(new SmtpClient { DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory, PickupDirectoryLocation = _mailLocalFolder }); }