internal Stream GetAttachmentStream(string attachmentName)
{
string path = Path.Combine(CurrentDirectory, attachmentName);
if (!System.IO.File.Exists(path))
{
if (Repository.SkipBinaryImport)
return null;
else
throw new FileNotFoundException("Attachment is not found", path);
}
return new FileStream(path, FileMode.Open, FileAccess.Read);
}